## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### Accessing the Default Logical Color Tables

There are five possible default logical color tables, which correspond to the five device default palette sets of colors. Each of these color tables contains the same RGB entries. However, they have different indexes into the HW palette. The indexes provide the nearest colors available when each of the device default color sets are loaded into the HW palette.

The default logical color tables are accessed through two pointers, DefaultDirectLogicalColorTable and DefaultMemoryLogicalColorTable, depending on whether an OD_DIRECT or OD_MEMORY DC is in use. There are also two copies of the special color table, which hold system colors and other special colors. These table copies, DirectSpecialColorTable and MemorySpecialColorTable, correspond to OD_DIRECT and OD_MEMORY DCs. Unlike the default logical color tables and the device default palette, these tables are changed by altering their entries rather than by pointing to different versions of the tables.

The special color tables should be updated by the display driver when the system colors change. All of the default logical color tables are updated immediately when the system colors are changed using CLR_BACKGROUND and CLR _NEUTRAL.