[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IColorFormat

IColorFormat Interface

Represents the color format of a drawing object, such as a fill, pattern, line, font, or gradient stop color.

Use this interface to read or modify drawing colors exposed by APIs such as Color, PatternColor, Color, Color, and Color. An IColorFormat can describe a theme-based color, an RGB color, or a color with brightness, tint, and shade adjustments.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface IColorFormat
Public Interface IColorFormat
Examples
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 10, 10, 120, 60);
IColorFormat colorFormat = shape.Fill.Color;
colorFormat.ObjectThemeColor = ThemeColor.Accent2;
colorFormat.Brightness = 0.25;
Color rgb = colorFormat.RGB;

Properties

Name Description
Brightness

Gets or sets the brightness adjustment applied to this color.

Valid values range from -1.0 to 1.0, where 0.0 indicates that no brightness adjustment is applied, negative values darken the color, and positive values lighten the color.

ColorType

Gets or sets the color type.

The returned value indicates how the current color is defined, such as RGB, Theme, Automatic, or None.

ObjectThemeColor

Gets or sets the workbook theme color used by this color format.

Setting this property uses the ThemeColor value to define the color and changes the color type to Theme.

RGB

Gets or sets the RGB color value.

Use this property to read or specify the current RGB color value used by APIs that accept color values.

TintAndShade

Gets or sets the tint and shade adjustment applied to this color.

A value of 0.0 indicates no adjustment, negative values darken the color, and positive values lighten the color.