Class ExcelColor
Color for cellstyling
Inherited Members
Namespace: OfficeOpenXml.Style
Assembly: EPPlus.dll
Syntax
public sealed class ExcelColor : StyleBase
Properties
Auto
Auto color
Declaration
public bool Auto { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Indexed
The indexed color number. A negative value means not set.
Declaration
public int Indexed { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Rgb
The RGB value
Declaration
public string Rgb { get; }
Property Value
| Type | Description |
|---|---|
| string |
Theme
The theme color
Declaration
public eThemeSchemeColor? Theme { get; }
Property Value
| Type | Description |
|---|---|
| eThemeSchemeColor? |
Tint
The tint value
Declaration
public double Tint { get; set; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
LookupColor()
Return the RGB hex string for the Indexed or Tint property
Declaration
public string LookupColor()
Returns
| Type | Description |
|---|---|
| string | The RGB color starting with a #FF (alpha) |
LookupColor(ExcelColor)
Return the RGB value as a string for the color object that uses the Indexed or Tint property
Declaration
public string LookupColor(ExcelColor theColor)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelColor | theColor | The color object |
Returns
| Type | Description |
|---|---|
| string | The RGB color starting with a #FF (alpha) |
SetAuto()
Set the color to automatic
Declaration
public void SetAuto()
SetColor(eThemeSchemeColor)
Set the color of the object
Declaration
public void SetColor(eThemeSchemeColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| eThemeSchemeColor | color | The color |
SetColor(ExcelIndexedColor)
Set the color of the object
Declaration
public void SetColor(ExcelIndexedColor color)
Parameters
| Type | Name | Description |
|---|---|---|
| ExcelIndexedColor | color | The color |
SetColor(Color)
Set the color of the object
Declaration
public void SetColor(Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color | color | The color |
SetColor(int, int, int, int)
Set the color of the object
Declaration
public void SetColor(int alpha, int red, int green, int blue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | alpha | Alpha component value |
| int | red | Red component value |
| int | green | Green component value |
| int | blue | Blue component value |