It's a specific, calculable number, not an approximation, and working through the math behind it is a genuinely satisfying way to understand exactly how much color range a standard hex code actually covers — and why that range is, for virtually every practical purpose, already more than the human eye can meaningfully distinguish.

The math behind the total count

256 × 256 × 256 = 16,777,216

Each of the three channels in a standard 6-digit hex code (red, green, blue) can independently take any of 256 values (0 through 255, represented as 00 through FF in hex). Multiplying the possibilities for all three channels together gives the total number of distinct colors representable: exactly 16,777,216, commonly rounded and referred to as "16.7 million colors" or "true color."

Why 256 specifically

256 comes from 2 to the power of 8 — each color channel is stored using 8 bits of data, and 8 bits can represent 2&sup8; = 256 distinct values. This 8-bit-per-channel standard, sometimes called 24-bit color when all three channels are combined (8+8+8=24 bits total), has been the common baseline for digital color for decades, which is why 256 shows up so consistently across color systems.

Why this is already more than the eye can distinguish

Human color perception research generally suggests people can distinguish somewhere in the range of several million to around 10 million distinct colors under ideal conditions, varying by individual and viewing circumstances — meaningfully fewer than the 16.7 million a standard hex code can represent. This is exactly why standard 8-bit color has remained the practical default for most everyday screen use: it already exceeds typical human discrimination ability for the vast majority of viewing conditions.

Where higher bit depths still matter

Despite standard color already exceeding typical perceptual limits in most everyday viewing, higher bit depths (like 10-bit or 16-bit per channel, covered in more detail in a related guide on image bit depth) still matter specifically for editing headroom — making significant adjustments to an image without introducing visible banding, even if the final displayed result stays within standard 8-bit range. The extra precision serves the editing process, not necessarily the final viewing experience.

A quick way to picture 16.7 million

To put the scale in perspective: if you displayed one distinct hex color per pixel on a 4K monitor (roughly 8.3 million pixels), you'd need exactly two full 4K screens' worth of pixels to display every single one of the 16.7 million possible hex colors just once, with no color repeated — a genuinely enormous range for a compact six-character code to represent.

How this number compares to older, more limited color systems

Early computer displays and graphics formats sometimes supported only 256 total colors, not per channel, a dramatically smaller palette than modern 16.7 million, which is part of why older digital images and games have a distinctly limited, sometimes banded color appearance compared to modern standards.

Try the Color Convert tool yourself — free, instant, nothing sent anywhere.

Open the tool

Frequently asked questions

Is 16.7 million colors the actual limit of what a screen can display?

It's the limit of what a standard 8-bit-per-channel hex code or RGB value can represent; some specialized displays and image formats support higher bit depths capable of representing far more distinct values, though standard 8-bit remains the common baseline for most everyday screens and web content.

Can the human eye actually see all 16.7 million colors?

No, human color discrimination research generally suggests people can distinguish somewhere in the range of several million to around 10 million distinct colors under good conditions, meaningfully fewer than the full 16.7 million a hex code can technically represent.

Why is 8-bit color sometimes called '24-bit color'?

Because it refers to the same standard from two different angles — 8 bits per channel across three channels (red, green, blue) totals 24 bits of color data per pixel, so "8-bit color" and "24-bit color" describe the identical standard.

Does a higher bit depth mean a visibly better-looking image?

Not necessarily for final viewing, since standard 8-bit already exceeds typical perceptual limits for most people in most conditions; higher bit depth mainly provides extra headroom during editing, reducing the risk of visible banding after significant adjustments.