Class ExcelColor
Color for cellstyling
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
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 |
|---|---|
| Boolean |
Indexed
The indexed color number. A negative value means not set.
Declaration
public int Indexed { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
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 |
|---|---|
| Nullable<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(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 |
|---|---|---|
| Int32 | alpha | Alpha component value |
| Int32 | red | Red component value |
| Int32 | green | Green component value |
| Int32 | blue | Blue component value |