Chapter 19 Color Palettes

Color palettes in the Microsoft Windows operating system provide an interface between an application and a color output device (such as a display device). Through this interface the application can take full advantage of the color capabilities of the output device without severely interfering with the colors displayed by other applications. Windows takes color information contained in an application's logical palette (a graphics object that is essentially a list of colors needed by the application) and applies it to a system palette (the list of colors that is available on the system and that is shared by all Windows applications). When more than one application displays colors from a logical palette, Windows intervenes, controlling which application has primary access to the system palette and maintaining a high level of color quality for the remaining applications.

This chapter covers the following topics:

Creating a logical palette for your application and preparing it for use

Using colors in the palette for painting in a window's client area

Making changes in your logical palette and controlling when Windows displays those changes

Responding to changes in the system palette made by other applications