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, IColor
Properties
Auto
Auto color
Declaration
public bool Auto { get; }
Property Value
Type | Description |
---|---|
System. |
Indexed
The indexed color number. A negative value means not set.
Declaration
public int Indexed { get; set; }
Property Value
Type | Description |
---|---|
System. |
Rgb
The RGB value
Declaration
public string Rgb { get; }
Property Value
Type | Description |
---|---|
System. |
Theme
The theme color
Declaration
public eThemeSchemeColor? Theme { get; }
Property Value
Type | Description |
---|---|
System. |
Tint
The tint value
Declaration
public decimal Tint { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
LookupColor()
Return the RGB hex string for the Indexed or Tint property
Declaration
public string LookupColor()
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Excel |
theColor | The color object |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
e |
color | The color |
SetColor(ExcelIndexedColor)
Set the color of the object
Declaration
public void SetColor(ExcelIndexedColor color)
Parameters
Type | Name | Description |
---|---|---|
Excel |
color | The color |
SetColor(Color)
Set the color of the object
Declaration
public void SetColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
System. |
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. |
alpha | Alpha component value |
System. |
red | Red component value |
System. |
green | Green component value |
System. |
blue | Blue component value |