Changing colors

The color database

The color database, based on the RGB color model, provides a predefined set of colors and shades of gray. This database specifies hundreds of different colors, including various shades for some colors. The database also provides 101 shades of gray. This large number of precisely graduated grays provides a wide variety of shading for gray scale screens.

The color database information is stored in compiled format in two files, rgb.dir and rgb.pag, located in the /usr/lib/X11 directory. In the same directory, the rgb.txt file lists all of the database information in ASCII format.

The rgb.txt file lists the name of each color defined in the database, variations on the color names (differing only in spelling, spacing, and capitalization), and the Red, Green, and Blue (RGB) values that are used to create each color. For more information on the RGB color model, see the next section.

To examine the contents of the rgb.txt file, open it with any text editor. The following is a partial listing of the rgb.txt file:

   255 250 250     snow
   248 248 255     ghost white
   248 248 255     GhostWhite
   245 245 245     white smoke
   245 245 245     WhiteSmoke
   220 220 220     gainsboro
   255 250 240     floral white
   255 250 240     FloralWhite
   253 245 230     old lace
   253 245 230     OldLace
   250 240 230     linen
   250 235 215     antique white
   250 235 215     AntiqueWhite
   255 239 213     papaya whip
   255 239 213     PapayaWhip
   255 235 205     blanched almond
   255 235 205     BlanchedAlmond
   255 228 196     bisque

You can also use the showrgb client to display the contents of the color database.

See also:

Next topic: The RGB and HSV color models
Previous topic: About colors

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003