Table of Contents

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

Action

_nameSpaceManager

Namespace manager

protected XmlNamespaceManager _nameSpaceManager

Field Value

XmlNamespaceManager

_path

The x-path

protected string _path

Field Value

string

_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

public eDrawingColorType ColorType { get; protected set; }

Property Value

eDrawingColorType

HslColor

A hsl color. This property has a value when Type is set to Hsl

public ExcelDrawingHslColor HslColor { get; }

Property Value

ExcelDrawingHslColor

PresetColor

A preset color. This property has a value when Type is set to Preset

public ExcelDrawingPresetColor PresetColor { get; }

Property Value

ExcelDrawingPresetColor

RgbColor

A rgb color. This property has a value when Type is set to Rgb

public ExcelDrawingRgbColor RgbColor { get; }

Property Value

ExcelDrawingRgbColor

RgbPercentageColor

A rgb precentage color. This property has a value when Type is set to RgbPercentage

public ExcelDrawingRgbPercentageColor RgbPercentageColor { get; }

Property Value

ExcelDrawingRgbPercentageColor

SystemColor

A system color. This property has a value when Type is set to System

public ExcelDrawingSystemColor SystemColor { get; }

Property Value

ExcelDrawingSystemColor

Transforms

Color transformations

public ExcelColorTransformCollection Transforms { get; }

Property Value

ExcelColorTransformCollection

Methods

ResetColors(string)

Reset the color objects

protected virtual void ResetColors(string newNodeName)

Parameters

newNodeName string

The new color node name

SetHslColor(double, double, double)

Sets a hsl color

public void SetHslColor(double hue, double saturation, double luminance)

Parameters

hue double

The hue angle. From 0-360

saturation double

The saturation percentage. From 0-100

luminance double

The luminance percentage. From 0-100

SetPresetColor(ePresetColor)

Sets a preset color.

public void SetPresetColor(ePresetColor presetColor)

Parameters

presetColor ePresetColor

The color

SetPresetColor(Color)

Sets a preset color. Must be a named color. Can't be color.Empty.

public void SetPresetColor(Color color)

Parameters

color Color

Color

SetRgbColor(Color, bool)

Sets a rgb color.

public void SetRgbColor(Color color, bool setAlpha = false)

Parameters

color Color

The color

setAlpha bool

Apply 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 double

Red percentage

greenPercentage double

Green percentage

bluePercentage double

Bluepercentage

SetSystemColor(eSystemColor)

Sets a system color

public void SetSystemColor(eSystemColor systemColor)

Parameters

systemColor eSystemColor

The colors