Hardware

Take a look at color depth

The amount of data used to represent a color is called color depth. Find out why color depth is important when working with graphics.

By Paul Anderson

RGB measures each channel from 0 to 255 because that's the range you get from 8 bits of data, and 8 bits make a byte. The amount of data used to represent a color is called color depth.

Color depth is important in two respects when working with graphics: the color depth of your monitor, and the color depth of the files you use to store your images. Monitor color depth depends on the capacity your display hardware supports and how the software drivers are configured. Your operating system usually provides some sort of control panel to set the display color depth. File color depth depends on the file format that you use to store your graphics.

True color

Since typical RGB uses three 8-bit channels, it adds up to a 24-bit color depth. When available, full 24-bit color is called true color. A true-color monitor displays every pixel's color exactly. The option often appears as Millions of Colors in monitor settings, because it adds up to 16,777,216 RGB combinations. Likewise, a true-color image file records the full range of colors precisely.

High color

True color allows more hues than the eye can distinguish, so most operating systems offer the option of 16-bit high color (Thousands of Colors on Macintosh). In high color, the monitor actually displays only 32 distinct levels of red, 32 of blue, and 64 of green. The visual difference is almost unnoticeable, but reducing the color depth to 16 bits per pixel boosts video performance. And running your computer system in high color won't affect your image data; most applications, such as Photoshop or a Web browser, still use the full 24-bit values. The data gets rounded off only when displayed on the monitor. That's why there are no high-color image file formats.

Indexed color

Older, less powerful computer hardware and certain file formats can handle only 8 bits per pixel. 8 bits can't hold much information for three channels, so 8-bit environments use indexed color. With indexed color images, the system or image file maintains a color table, or palette, of up to 256 colors. The 8-bit value for each pixel identifies which of those colors to use—the computer equivalent of painting by numbers. Indexed color lets 8-bit displays and images simulate true color, since the palette colors themselves are 24 bits deep.

An indexed-color image file contains a palette for the colors it uses, and an 8-bit display has a palette for the colors it can show. Usually a system running in indexed color allows a separate palette for each application, which is why starting, switching, or closing applications may briefly alter the colors that you see on your screen.

Paul Anderson is associate technical editor for CNET Builder.com. His responsibilities don't include handling graphics, so naturally, he handles them all the time.

Editor's Picks