Class ExcelColor
Color for cellstyling
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 |
---|---|
System.Boolean |
Indexed
The indexed color number. A negative value means not set.
Declaration
public int Indexed { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Rgb
The RGB value
Declaration
public string Rgb { get; }
Property Value
Type | Description |
---|---|
System.String |
Theme
The theme color
Declaration
public eThemeSchemeColor? Theme { get; }
Property Value
Type | Description |
---|---|
System.Nullable<eThemeSchemeColor> |
Tint
The tint value
Declaration
public decimal Tint { get; set; }
Property Value
Type | Description |
---|---|
System.Decimal |
Methods
LookupColor()
Return the RGB hex string for the Indexed or Tint property
Declaration
public string LookupColor()
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.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 |
---|---|---|
System.Drawing.Color | color | The color |
SetColor(Int32, Int32, Int32, Int32)
Set the color of the object
Declaration
public void SetColor(int alpha, int red, int green, int blue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | alpha | Alpha component value |
System.Int32 | red | Red component value |
System.Int32 | green | Green component value |
System.Int32 | blue | Blue component value |