<fgColor> (Foreground Color)

Foreground color of the cell fill pattern. Cell fill patterns operate with two colors: a background color and a foreground color. These combine together to make a patterned cell fill.

Parent Elements

<patternFill>3.8.32)

Attributes

Description

<auto> (Automatic)

A boolean value indicating the color is automatic and system color dependent.

The possible values for this attribute are defined by the XML Schema boolean datatype.

<indexed> (Index)

Indexed color value. Only used for backwards compatibility. References a color in <indexedColors>.

The possible values for this attribute are defined by the XML Schema unsignedInt datatype.

<rgb> (Alpha Red Green Blue Color Value)

Standard Alpha Red Green Blue color value (ARGB).

The possible values for this attribute are defined by the ST_UnsignedIntHex simple type (§3.18.86).

<theme> (Theme Color)

Index into the <clrScheme> collection, referencing a particular <sysClr> or <srgbClr> value expressed in the Theme part.

The possible values for this attribute are defined by the XML Schema unsignedInt datatype.

<tint> (Tint)

Specifies the tint value applied to the color.

If tint is supplied, then it is applied to the RGB value of the color to determine the final color applied.

The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken and 1.0 means 100% lighten. Also, 0.0 means no change.

In loading the RGB value, it is converted to HLS where HLS values are (0..HLSMAX), where HLSMAX is currently 255.

example:

Here are some examples of how to apply tint to color:

If (tint < 0)

Lum’ = Lum * (1.0 + tint)

For example: Lum = 200; tint = -0.5; Darken 50%

Lum‘ = 200 * (0.5) => 100

For example: Lum = 200; tint = -1.0; Darken 100% (make black)

Lum‘ = 200 * (1.0-1.0) => 0

If (tint > 0)

Lum‘ = Lum * (1.0-tint) + (HLSMAX – HLSMAX * (1.0-tint))

For example: Lum = 100; tint = 0.75; Lighten 75%

Lum‘ = 100 * (1-.75) + (HLSMAX – HLSMAX*(1-.75))

= 100 * .25 + (255 – 255 * .25)

= 25 + (255 – 63) = 25 + 192 = 217

For example: Lum = 100; tint = 1.0; Lighten 100% (make white)

Lum‘ = 100 * (1-1) + (HLSMAX – HLSMAX*(1-1))

= 100 * 0 + (255 – 255 * 0)

= 0 + (255 – 0) = 255

The possible values for this attribute are defined by the XML Schema double datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Color">
	<attribute name="auto" type="xsd:boolean" use="optional"/>
	<attribute name="indexed" type="xsd:unsignedInt" use="optional"/>
	<attribute name="rgb" type="ST_UnsignedIntHex" use="optional"/>
	<attribute name="theme" type="xsd:unsignedInt" use="optional"/>
	<attribute name="tint" type="xsd:double" use="optional" default="0.0"/>
</complexType>