4 The Arithmetic of Color Depth

Resolution isn't the only factor governing the quality of your images. Equally important is the number of colors in the image. When you view a natural scene, or a well done photographic color print, you are able to differentiate millions of colors. Digital images can approximate this color realism, but whether they do so on your system depends on its capabilities and its settings. How many colors there are in an image, or how many a system can display is referred to as color depth, pixel-depth, or bit depth. Older PCs are stuck with displays that show only 16 or 256 colors. However, almost all newer systems include a video card and a monitor that can display what's called 24-bit True Color. It's called true color because these systems display 16 million colors, about the number the human eye can discern.

TIP: Checking Your System

You may have to set your system to full-color, it doesn't happen automatically. To see if your Windows system supports True Color (not all do), display Window's Start menu, point to Settings to cascade the menu, and then click Control Panel. When the Control panel opens, double-click the Display icon or command to display the Display Properties dialog box, then click the Settings tab on the dialog box and check the Color palette setting.

How do bits and colors relate to one another? It's simple arithmetic. To calculate how many different colors can be captured or displayed, simply raise the number 2 to the power of the number of bits used to record or display the image. For example, 8-bits gives you 256 colors because 28=256. Here's a table to show you some other possibilities.

Name Bits per pixel Formula Number of colors
Black and white 1 21 2
Windows display 4 24 16

Gray scale

8 28 256
256 color 8 28 256
High color 16 216 65 thousand
True color 24 224 16 million

Black and white images require only 2-bits to indicate which pixels are white and which are black. Gray scale images need 8 bits to display 256 different shades of gray. Color images are displayed using 4 bits (16 colors), 8 bits (256 colors), 16 bits (65 thousand colors) called high color, and 24 bits (16 million colors) called true color. Some cameras and scanners will use 30 or 36 bits per pixel. These extra bits are used to improve the color in the image as it is processed down to its 24-bit final form. (Ed note: Are there any 30/36 bit monitors or printers?)

Review: Bits and Bytes

When reading about digital systems, you frequently encounter the terms bit and byte.

The bit is the smallest digital unit. It's basically a single element in the computer that like a light bulb has only two possible states, on (indicating 1) or off (indicating 0). The term bit is a contraction of the more descriptive phrase binary digit.

Bytes are groups of 8-bits linked together for processing. Since each of the eight bits has two states (on or off), the total amount of information that can be conveyed is 28 (2 raised to the 8th power), or 256 possible combinations.

Click to return to top of page Exploring Color Depth

This figure and Part 4 on the Excel worksheet "Image Size Calculator" calculate the total number of pixels in an image when you enter the images width and height in pixels.

math-color depth.gif (5644 bytes)

1. Enter any bits per pixel from the table of color depths (on line 7 and following) on this line.

2. A formula on this line calculates the number of possible colors by raising the number 2 to number of bits per pixel.

3. Enter the width of the digital image in pixels on this line.

4. Enter the height of the digital image in pixels on this line.

5. A formula on this line calculates the total number of pixels in the image by multiplying the image’s width by its height.

6. A formula on this line calculates the size of the uncompressed file that would be needed to store the image of the size and color depth you’ve entered. File sizes are shown in bytes, kilobytes, and megabytes.

Click to return to the home pageClick to return to this book's contents pageClick to jump back to the previous chapterClick to advance to the next chapter
Click for contact and leagal information