Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Specifying Color Values

Style Manager uses RGB values when writing color information to its palette files. The syntax for RGB numbers is:

#RedGreenBlue

Red, Green, and Blue are hexadecimal numbers, each 1 to 4 digits long, that indicate the amount of that color used. There must be the same number of digits for each of the colors. Thus, valid color values consist of 3, 6, 9, or 12 hexadecimal digits.

For example, white can be specified in any of the following ways:

#fff
#ffffff
#fffffffff
#fffffffffffff

If you set a color resource directly, you can use either the color name or RGB value. The file /usr/lib/X11/rgb.txt lists all the named colors.