The Logical Palette

A logical palette is a color palette that an application creates and associates with a device context. Logical palettes let applications define and use colors that meet their specific needs. Applications can create any number of logical palettes, using them for separate device contexts or switching between them for a single device context. An application creates a logical palette by using the CreatePalette function.

A logical palette is actually a color table in memory that mimics the hardware palette in the video board. Each entry in the logical palette contains an RGB value that Windows applications can use for creating colored pens, fonts, brushes, and bitmaps. The logical palette can contain more entries than the hardware ...

Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.