Ian-Albert.com Contact Me
( Home )-( Graphics and Color)-( Color Depth )
Strip illustration

Computers have a number of ways of representing and displaying color. When personal computers were first becoming popular, memory and processing speed were limited, so it was necessary to limit the number of colors available.

At the very lowest end is monochrome, consisting only of black or white (no shades of gray). This is known as 1-bit color, since each pixel only requires one bit to store it in memory (0 = black, 1 = white).

There was also 2-bit color, allowing four colors. This was typical of EGA video modes. More common, especially among Windows 3.1 users, was 4-bit color, which had 16 colors. This palette consisted of black, white, two shades of gray, red, green, blue, aqua, magenta, and yellow, plus darker versions of these colors. This palette was fixed, meaning the 16 colors were always those just listed. The number of colors is equal to 2 raised to the number of bits. So 4-bit color = 24 = 16 colors.

Next came 8-bit, or 256-color video modes. This was an indexed color mode, like 4-bit, meaning that any color can be displayed, but no more than 256 unique colors can be shown at once. Colors on the screen are represented in memory as numbers from 0 to 255. When the video card displays the image it looks at the index value of each pixel. Let's say a pixel has an index of 23 as an example. It then consults the 23rd entry in a lookup table (the palette) to see what color that is in terms of red, green, and blue amounts (each on a scale from 0 to 255, or sometimes from 0 to 63). This is the color that is then sent to the monitor. It acts like a paint-by-numbers painting this way. While any color could be displayed in this way, only 256 unique colors could be shown at once. Scanned photos usually contain many thousands or millions of colors. If a photo is displayed in an 8-bit video mode the computer can either analyze the picture to find the most frequently occuring colors, or use a standard, general-purpose palette (such as the web-safe palette). Then the closest match for each pixel in the photo is displayed. This can produce very ugly results, however.

2-bit
2-bit
2-bit
16bit 5-5-5
16bit 5-5-5
16bit 5-5-5
1-bit (2-color, monochrome) 15-bit (32,768-color)
4bit
4bit
4bit
16bit 5-6-5
16bit 5-6-5
16bit 5-6-5
4-bit (16-color) 16-bit (65,536-color) - Six bits are allocated to green and five to red and blue.
8bit
8bit
8bit
32bit
32bit
32bit
8-bit (256-color - using Windows palette) 24-bit/32-bit (16,777,216-color)
Simulations of different color depths. Note that these simulations will only look accurate if you're running at 24- or 32-bit color.

More recently, computers began using 16-bit or 32-bit color modes. Neither of these modes use palettes. Instead, the values in memory directly represent the red, green, and blue values to send to the monitor. For 16-bit, each pixel consists of 5 bits for each of the three channels, red, green, and blue, which allows 32 possible values for each channel. This only adds up to 15 bits, however. In some configurations this extra bit is used for alpha or ignored. Better color depth is achieved when 6 bits are allocated to the green channel, the one our eye is most sensitive to. This scheme can generate 32,768 colors in 5-5-5-bit (15-bit) mode or 65,536 in 5-6-5-bit (16-bit) mode. Most users will never notice the shortcomings of 16-bit color unless they display images with subtle gradients.

True color is a nickname for 24-bit and 32-bit color. This mode allocates one byte per color channel, meaning red, green, and blue can have a full 256 possible intensities. In 32-bit mode, the remaining fourth byte is used for extra information, usually alpha. While it's possible to have more precision in intensity levels, most operating systems do not support anything better than 24-bit/32-bit color.

Sample image: detail of a copy of DaVinci's "Lost Battle of Anghiari," drawn by Peter Paul Ruben in 1603.

Contact Me