[]
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.
public interface IColorFormat
Public Interface IColorFormat
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;
| Name | Description |
|---|---|
| Brightness | Gets or sets the brightness adjustment applied to this color.
Valid values range from |
| 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 |