Color Depth: Bits Per Pixel vs. Bits Per Channel
Color depth is the number of bits storing a pixel's color, like a digital paint box's size. It's key for image formats and displays, affecting file size and fidelity. The footgun is confusing total bits per pixel (bpp) with bits per channel (bpc).
WHY IT EXISTS Computers need a way to numerically represent color. Color depth defines the precision of that representation, balancing visual fidelity against data size. Without a standard way to define this precision, sharing and displaying images consistently would be impossible.
THE MENTAL MODEL Think of color depth as the size of a digital paint box for each pixel. A 1-bit depth is just black and white. An 8-bit depth gives you a palette of 256 colors. A 24-bit depth provides 16.7 million colors. More bits mean a larger, more nuanced palette.
HOW IT WORKS Color depth is measured in bits, and the total number of available colors is 2 to the power of the bit depth. The measurement itself can be ambiguous, which is the main source of confusion. It can mean 'bits per pixel' (bpp), which is the total number of bits for a single pixel's color. Or, it can mean 'bits per channel' (bpc), referring to the bits for each individual color component (like Red, Green, and Blue). Modern systems prefer specifying bits per channel for clarity.
WHEN TO USE IT The concept is fundamental when working with image processing, graphics programming, and display hardware. Higher color depth is needed for photorealistic rendering and professional photography to avoid color banding. Lower depth is fine for UIs or simple graphics where file size is a major constraint.
WHEN NOT TO USE IT Don't over-specify color depth when it's not needed. Using a 30-bit depth (10 bpc) for a simple web icon is wasteful. The human eye can't perceive the difference in most contexts, and it increases file size, memory usage, and processing overhead for no user benefit.
ONE CANONICAL EXAMPLE "True color" is a 24-bit color depth. This means each pixel is represented by 24 bits per pixel (bpp). In the common RGB model, this is allocated as 8 bits per channel (bpc): 8 bits for the red component, 8 for the green, and 8 for the blue. This allows for 2^24, or 16,777,216, different colors, which is generally enough for photorealistic images.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.