Chapter 16. The Palette Manager

This chapter would not exist were it not for a hardware deficiency. Although many modern video adapter boards offer 24-bit color (also known as “true color” or “millions of colors”) or 16-bit color (“high color” or “thousands of colors”), some video adapters—particularly on laptops or in high-resolution video modes—allow only 8 bits per pixel. The use of 8 bits per pixel implies only 256 simultaneous colors.

What can we do with 256 colors? While a mere 16 colors are clearly inadequate for displaying real-world images and the use of thousands or millions of colors is quite sufficient for that task, 256 colors falls somewhere in the middle. Yes, 256 colors are adequate for displaying a real-world image, but only if ...

Get Programming Windows®, Fifth Edition 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.