Skip to main content

XlColor.ColorIndex Property

Gets the indexed color value. Only used for backwards compatibility.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public int ColorIndex { get; }

Property Value

Type Description
Int32

An integer value that is a zero-based color index.

Remarks

The ColorIndex property references a color in “indexedColors” defined by the OpenXML specification as a deprecated indexing scheme for colors that is still required for some records and backwards compatibility with legacy formats.

This element contains a sequence of RGB color values that correspond to color indexes (zero-based).

The table below provides default mappings from indexed color values to ARGB values. Indexes 0-7 are redundant of 8-15 to preserve backwards compatibility.

Color Index ARGB Value
0 00000000
1 00FFFFFF
2 00FF0000
3 0000FF00
4 000000FF
5 00FFFF00
6 00FF00FF
7 0000FFFF
(none) (none)
8 00000000
9 00FFFFFF
10 00FF0000
11 0000FF00
12 000000FF
13 00FFFF00
14 00FF00FF
15 0000FFFF
16 00800000
17 00008000
18 00000080
19 00808000
20 00800080
21 00008080
22 00C0C0C0
23 00808080
24 009999FF
25 00993366
26 00FFFFCC
27 00CCFFFF
28 00660066
29 00FF8080
30 000066CC
31 00CCCCFF
32 00000080
33 00FF00FF
34 00FFFF00
35 0000FFFF
36 00800080
37 00800000
38 00008080
39 000000FF
40 0000CCFF
41 00CCFFFF
42 00CCFFCC
43 00FFFF99
44 0099CCFF
45 00FF99CC
46 00CC99FF
47 00FFCC99
48 003366FF
49 0033CCCC
50 0099CC00
51 00FFCC00
52 00FF9900
53 00FF6600
54 00666699
55 00969696
56 00003366
57 00339966
58 00003300
59 00333300
60 00993300
61 00993366
62 00333399
63 00333333
64 XlColor.DefaultForeground
65 XlColor.DefaultBackground
See Also