7.1 About color

7.1.2 The color map

The system color map is a mapping of pixel values onto the machine-dependent colors of the host system. A common way of specifying a machine-dependent color shade is by specifying the component shades red, green, and blue.

A system color map generally has(expt2 depth) entries, where depth is the depth of the system display. The number of colors a system can show at any one time is the number of entries in the color map. The total number of different colors a system can display depends on the integer range with which the system allows you to specify the display value of the red, green, and blue color components. The Window Tool Kit allows a specification of 16 bits, or the range between 0 and 65535, for each component of a color.

You can only have as many different colors as the underlying host system allows. For example, if the underlying host system allows 8 bits to specify each component of a color, rather than 16, the total number of different colors that the system can display is(expt224). If the underlying system allows the same precision as the Window Tool Kit, the total number of different colors is(expt248).

Note: Some of the functions and constants in the Window Tool Kit use the abbreviation mdc to stand for "machine-dependent color" and the abbreviation mic to stand for "machine-independent color.


The Window Tool Kit - 9 SEP 1996

Generated with Harlequin WebMaker