Dithering

If an application requests a color not available in the physical color table, the operating system can approximate the color by a process called dithering. For example, if the physical color table does not contain a light green color but does contain a yellow and a green, the operating system can create what appears to be light green by mixing yellow pels and green pels. Dithering is a variation on the way red, green, and blue color guns illuminate the phosphors in a single pel to produce a color that is not pure red, green, or blue (for example, yellow).

The dithering process takes advantage of the way the human eye interprets color. If every other pel is set to one color, and all the intermediate pels to a different color, together they produce the effect of a third color at normal viewing distances.

The checkerboard effect is just one of the ways in which dithering can be implemented. Dithering works only when producing a solid mass of color, such as an area fill pattern. It does not have the desired effect on line primitives.

Dithering is especially important on monochrome devices. By combining various combinations of black pels with white pels, the operating system can create numerous shades of gray.

To use only the pure colors defined in the physical color table, that is, to prevent color dithering, set LCOL_PURECOLOR in GpiCreateLogColorTable. When LCOL_PURECOLOR is set, the nearest available color to the one selected is used.


[Back: Color on Advanced Display Devices]
[Next: Considerations When Using Monochrome Displays]