Class ExcelDrawingThemeColorManager
- Namespace
- OfficeOpenXml.Drawing.Style.Coloring
- Assembly
- EPPlus.dll
Manages colors in a theme
public class ExcelDrawingThemeColorManager
- Inheritance
-
ExcelDrawingThemeColorManager
- Derived
- Inherited Members
Fields
_colorNode
The node of the color object
protected XmlNode _colorNode
Field Value
- XmlNode
_initMethod
Init method
protected Action _initMethod
Field Value
_nameSpaceManager
Namespace manager
protected XmlNamespaceManager _nameSpaceManager
Field Value
- XmlNamespaceManager
_path
The x-path
protected string _path
Field Value
_pathNode
The node of the supplied path
protected XmlNode _pathNode
Field Value
- XmlNode
_schemaNodeOrder
Order of the elements according to the xml schema
protected string[] _schemaNodeOrder
Field Value
- string[]
_topNode
The top node
protected XmlNode _topNode
Field Value
- XmlNode
Properties
ColorType
The type of color.
Each type has it's own property and set-method.
SetRgbColor(Color, bool)
SetRgbPercentageColor(double, double, double)
SetHslColor(double, double, double)
SetPresetColor(Color)
SetPresetColor(ePresetColor)
SetSystemColor(eSystemColor)
SetSchemeColor(eSchemeColor)
public eDrawingColorType ColorType { get; protected set; }
Property Value
HslColor
A hsl color. This property has a value when Type is set to Hsl
public ExcelDrawingHslColor HslColor { get; }
Property Value
PresetColor
A preset color. This property has a value when Type is set to Preset
public ExcelDrawingPresetColor PresetColor { get; }
Property Value
RgbColor
A rgb color. This property has a value when Type is set to Rgb
public ExcelDrawingRgbColor RgbColor { get; }
Property Value
RgbPercentageColor
A rgb precentage color. This property has a value when Type is set to RgbPercentage
public ExcelDrawingRgbPercentageColor RgbPercentageColor { get; }
Property Value
SystemColor
A system color. This property has a value when Type is set to System
public ExcelDrawingSystemColor SystemColor { get; }
Property Value
Transforms
Color transformations
public ExcelColorTransformCollection Transforms { get; }
Property Value
Methods
ResetColors(string)
Reset the color objects
protected virtual void ResetColors(string newNodeName)
Parameters
newNodeName
stringThe new color node name
SetHslColor(double, double, double)
Sets a hsl color
public void SetHslColor(double hue, double saturation, double luminance)
Parameters
hue
doubleThe hue angle. From 0-360
saturation
doubleThe saturation percentage. From 0-100
luminance
doubleThe luminance percentage. From 0-100
SetPresetColor(ePresetColor)
Sets a preset color.
public void SetPresetColor(ePresetColor presetColor)
Parameters
presetColor
ePresetColorThe color
SetPresetColor(Color)
Sets a preset color. Must be a named color. Can't be color.Empty.
public void SetPresetColor(Color color)
Parameters
color
ColorColor
SetRgbColor(Color, bool)
Sets a rgb color.
public void SetRgbColor(Color color, bool setAlpha = false)
Parameters
color
ColorThe color
setAlpha
boolApply the alpha part of the Color to the Transforms collection
SetRgbPercentageColor(double, double, double)
Sets a rgb precentage color
public void SetRgbPercentageColor(double redPercentage, double greenPercentage, double bluePercentage)
Parameters
redPercentage
doubleRed percentage
greenPercentage
doubleGreen percentage
bluePercentage
doubleBluepercentage
SetSystemColor(eSystemColor)
Sets a system color
public void SetSystemColor(eSystemColor systemColor)
Parameters
systemColor
eSystemColorThe colors