Three of the index names provide a level of device independence in choosing colors: CLR_DEFAULT, CLR_BACKGROUND, and CLR_NEUTRAL. These indexes enable an application to select colors according to their purpose, and thus build device independence into your applications. The purpose of a color does not vary from one device to another, although the actual color used to implement that purpose might. The following table describes these indexes and the purpose of each:

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Index               ³Purpose                                 ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³CLR_BACKGROUND      ³The natural background color for the    ³
³                    ³device. This is the color of the paper  ³
³                    ³on a printer, and the window background ³
³                    ³color (white, by default) on a display. ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³CLR_NEUTRAL         ³The contrast color to CLR_BACKGROUND.   ³
³                    ³This is usually black on a printer, and ³
³                    ³the default window text color (black, by³
³                    ³default) on a display.                  ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³CLR_DEFAULT         ³Unless redefined, this has the same     ³
³                    ³effect as CLR_NEUTRAL.                  ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

The colors produced by CLR_DEFAULT, CLR_BACKGROUND, and CLR_NEUTRAL in the default logical color table depend on the output device. For example, CLR_NEUTRAL could produce black on a device with a white background or white on a device with a black background.


[Back] [Next]