Each output device has its own physical color table, which is organized like a logical color table. The physical color table contains the RGB color definitions of the distinct colors that the device can produce, while a logical color table contains the definitions of the colors as chosen by an application. When an application draws on an output device, the PM maps the index value that addresses the current color in the logical color table to the index that retrieves the closest match for the current color in the physical color table.

Because this substitution occurs when the graphics are drawn, the presentation space can be associated with a number of different device contexts without invalidating the logical color definitions. For example, an application can create a picture on the screen using a wide range of colors, then direct that drawing to an eight-pen vector plotter. The drawing is reproduced without having to be re-created. Although the picture, as drawn by the plotter, does not have the variety of colors displayed on the screen, the substitution process selects the nearest match for each color on the screen from the eight available colors on the plotter.


[Back] [Next]