7.2: From two colors to millions
These images display color at different bit depths. The difference between 24 bpp and 16 bpp is subtle.
What is pixel depth?
Pixel depth, also known as bit depth, determines how many unique colors are available for a given computer display, or how many unique colors are encoded in a digital image:
- Pixel depth is the number of bits assigned to each screen pixel from the computer’s video random-access memory (VRAM).
- Computer memory chips store information in bits, binary digits, each of which can be a 1 or a 0.
- Every computer sold today has separate memory and a separate processor for the screen display.
- Every computer sold today dedicates 24 bits of memory for each screen pixel.
- With 24 bits of memory, each pixel can display 216 combinations of bits, or 16,777,216 unique colors.
- Pixel depth for an image is the number of bits encoded for each pixel.
- The standard gray-scale image has 8 bits assigned to each pixel.
- This produces 28 combinations of bits for 256 shades of gray, counting black and white.
- Images with higher pixel depths can encode more colors because each pixel has more combinations of 0's and 1's available.
Every pixel in a color digital image is created through a combination of the red, green and blue primaries, often referred to as color channels.
- A pixel on a screen can display any level of color; it is limited only by bit depth.
- Bit depth is often specified in bits per channel; pixel depth is the sum of the bits in all three color channels.
- The color images from digital cameras and the colors displayed on a typical computer screen have 8 bits per channel, or eight combinations of 0’s and 1’s. This allows for 28 or 256 different combinations, or 256 levels of intensity for each primary color.
- When all three primary colors are combined at each pixel, a total of 28×3 or 16,777,216 different colors can be displayed.
MONOCHROME IMAGES: Early computer monitors displayed two colors, black and white. Each pixel had one bit of data available, and pixels were dithered to give the illusion of shades of gray.
GRAYSCALE IMAGES: With expanded the memory available for video display, computer screens could display 255 shades of gray, plus white. Each pixel had eight bits, or one byte, of data available. These were the same screens used for monochrome, but with more video RAM.
INDEXED COLOR: A color screen is capable of displaying millions of colors, but the first color computers still had the same eight bits of video memory per pixel. Pictures were displayed with the best palette of 256 colors (28). The palette was different for each picture. Colors were dithered to simulate a wider color range.
TRUE COLOR: Today, computers have high-speed video boards with plenty of RAM. Each pixel is supported by 24 bits of memory, eight bits for each channel of red, green and blue. The screen can display 16,777,216 colors (224).