IndexedColors Class

Color Indexes.When the object is serialized out as xml, its qualified name is x:indexedColors.

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

[ChildElementInfoAttribute(typeof(RgbColor))]
public class IndexedColors : OpenXmlCompositeElement

The following table lists the possible child types:

  • RgbColor <x:rgbColor>


[ISO/IEC 29500-1 1st Edition]

18.8.27 indexedColors (Color Indexes)

A legacy indexing scheme for colors that is still required for some records, and for backwards compatibility with legacy formats.

This element contains a sequence of RGB color values that correspond to color indexes (zero-based). When using the default indexed color palette, the values are not written out, but instead are implied. When the color palette has been modified from default, then the entire color palette is written out.

Here is the table of default mappings from indexed color value to ARGB value. Note that 0-7 are redundant of 8-15 to preserve backwards compatibility.

Color Index

ARGB Value

[Example:

indexed="0"

00000000

 

indexed="1"

00FFFFFF

 

indexed="2"

00FF0000

 

indexed="3"

0000FF00

 

indexed="4"

000000FF

 

indexed="5"

00FFFF00

 

indexed="6"

00FF00FF

 

indexed="7"

0000FFFF

 

(none)

(none)

indexed="8"

00000000

 

indexed="9"

00FFFFFF

 

indexed="10"

00FF0000

 

indexed="11"

0000FF00

 

indexed="12"

000000FF

 

indexed="13"

00FFFF00

 

indexed="14"

00FF00FF

 

indexed="15"

0000FFFF

 

indexed="16"

00800000

 

indexed="17"

00008000

 

indexed="18"

00000080

 

indexed="19"

00808000

 

indexed="20"

00800080

 

indexed="21"

00008080

 

indexed="22"

00C0C0C0

 

indexed="23"

00808080

 

indexed="24"

009999FF

 

indexed="25"

00993366

 

indexed="26"

00FFFFCC

 

indexed="27"

00CCFFFF

 

indexed="28"

00660066

 

indexed="29"

00FF8080

 

indexed="30"

000066CC

 

indexed="31"

00CCCCFF

 

indexed="32"

00000080

 

indexed="33"

00FF00FF

 

indexed="34"

00FFFF00

 

indexed="35"

0000FFFF

 

indexed="36"

00800080

 

indexed="37"

00800000

 

indexed="38"

00008080

 

indexed="39"

000000FF

 

indexed="40"

0000CCFF

 

indexed="41"

00CCFFFF

 

indexed="42"

00CCFFCC

 

indexed="43"

00FFFF99

 

indexed="44"

0099CCFF

 

indexed="45"

00FF99CC

 

indexed="46"

00CC99FF

 

indexed="47"

00FFCC99

 

indexed="48"

003366FF

 

indexed="49"

0033CCCC

 

indexed="50"

0099CC00

 

indexed="51"

00FFCC00

 

indexed="52"

00FF9900

 

indexed="53"

00FF6600

 

indexed="54"

00666699

 

indexed="55"

00969696

 

indexed="56"

00003366

 

indexed="57"

00339966

 

indexed="58"

00003300

 

indexed="59"

00333300

 

indexed="60"

00993300

 

indexed="61"

00993366

 

indexed="62"

00333399

 

indexed="63"

00333333

 

indexed="64"

System Foreground

n/a

indexed="65"

System Background

n/a

Parent Elements

colors (§18.8.11)

Child Elements

Subclause

rgbColor (RGB Color)

§18.8.34

[Note: The W3C XML Schema definition of this element’s content model (CT_IndexedColors) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show: