Class ExcelColor
- Namespace
- OfficeOpenXml.Style
- Assembly
- EPPlus.dll
Color for cellstyling
public sealed class ExcelColor : StyleBase
- Inheritance
-
ExcelColor
- Inherited Members
Properties
Auto
Auto color
public bool Auto { get; }
Property Value
Indexed
The indexed color number. A negative value means not set.
public int Indexed { get; set; }
Property Value
Rgb
The RGB value
public string Rgb { get; }
Property Value
Theme
The theme color
public eThemeSchemeColor? Theme { get; }
Property Value
Tint
The tint value
public decimal Tint { get; set; }
Property Value
Methods
LookupColor()
Return the RGB hex string for the Indexed or Tint property
public string LookupColor()
Returns
- 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
public string LookupColor(ExcelColor theColor)
Parameters
theColor
ExcelColorThe color object
Returns
- string
The RGB color starting with a #FF (alpha)
SetAuto()
Set the color to automatic
public void SetAuto()
SetColor(eThemeSchemeColor)
Set the color of the object
public void SetColor(eThemeSchemeColor color)
Parameters
color
eThemeSchemeColorThe color
SetColor(ExcelIndexedColor)
Set the color of the object
public void SetColor(ExcelIndexedColor color)
Parameters
color
ExcelIndexedColorThe color
SetColor(Color)
Set the color of the object
public void SetColor(Color color)
Parameters
color
ColorThe color
SetColor(int, int, int, int)
Set the color of the object
public void SetColor(int alpha, int red, int green, int blue)