22.9.2.5 ST_HexColorRGB

This simple type specifies that its contents shall contain a color value in RRGGBB hexadecimal format, specified using six hexadecimal digits. Each of the red, green, and blue color values, from 0-255, is encoded as two hexadecimal digits.

[Example: Consider a color defined as follows:

Red:
Green:
Blue:
  122
  23
  209

The resulting RRGGBB value would be 7A17D1, as each color is transformed into its hexadecimal equivalent. end example]

This simple type’s contents are a restriction of the W3C XML Schema hexBinary datatype.

This simple type also

specifies the following restrictions:

  • This simple type’s contents have a length of exactly 6 hexadecimal digit(s).

[Note: The W3C XML Schema definition of this simple type’s content model (ST_HexColorRGB) is located in A.6.9. end note]

Last updated on