December 2000
Intermediate to advanced
1280 pages
28h 56m
English
Up to this chapter, we have been using lots of colors in our programs; we talked about color pens, color brushes, 16-, 24-, and 32-bit bitmaps, gradient fill, alpha blending, and image processing. But if we run these programs on a 256-color display monitor, suddenly we go back to the dark ages. All the colorful displays turn grayish with ugly dithering patterns.
The problem lies in the palette, a tool that Windows GDI and display hardware borrowed from graphics artists to map the color index in a palette-based frame buffer to RGB colors.
In this chapter, we discuss what happens if you don't pay attention to the palette at all, what's the least you should do if you want your program to run reasonably well on palette-based displays, ...