What Is Colour Depth?

The number behind 'true colour', the 256-colour ceiling on GIFs, and why a smooth sky sometimes turns into visible stripes.

Flat vector illustration in midnight blue of a print studio at dusk: a large sheet of colour swatch squares on a workbench, ink pots, wide-format printers, and an orange sunset window

Colour depth is how many distinct colours an image is allowed to store, set by how many bits it spends on each pixel. More bits means more possible colours and a larger file; fewer bits means fewer colours and a smaller file — with a catch that shows up on smooth gradients. It's one of the quieter numbers in imaging, but it explains the 256-colour ceiling on GIFs and why a clear blue sky sometimes arrives in visible stripes.

What the numbers mean

A normal colour photo uses 8 bits per channel — red, green and blue — which gives 256 levels of each. Multiply them together and you get about 16.7 million colours. That's what "24-bit colour" or "true colour" means, and it's enough that your eye reads gradients as perfectly smooth.

Drop the depth and the count collapses fast. An indexed image stores a small lookup table instead of a value per pixel: a PNG-8 or a GIF caps out at 256 colours total, not 256 per channel. For a flat logo that's plenty. For a photograph it's nowhere near, which is why a photo forced down to 256 colours looks blotchy.

A smooth gradient against a low-colour-depth version of the same gradient Two horizontal bars. The top bar is a smooth continuous gradient from light to dark, labelled high colour depth. The bottom bar is the same gradient reduced to a handful of flat steps with visible edges between them, labelled low colour depth, showing banding. High depth — smooth Low depth — banding
Fewer colours to work with means the gradient has to jump between steps. Those jumps are what "banding" is.

Why it's worth knowing: file size

Fewer colours compress better. A lossless format shrinks a file by describing repetition, and an image with only a handful of colours has far more repetition to describe — so cutting colour depth is a real way to shrink a graphic without switching to a lossy format.

That's not just theory on this site — it's exactly how Compress PNG works. PNG is lossless, so there's no lossy quality setting to turn; instead its slider quietly reduces how many colour levels each channel keeps. Turned down, it stores fewer colours, which compresses smaller — and because it leaves the transparency channel completely untouched, your alpha survives exactly. On a screenshot or flat graphic you can often cut a lot before any change is visible; on a photograph you'll hit banding sooner, which is your cue to use PNG to JPG instead.

The 256-colour ceiling: GIF

GIF is capped at 256 colours per frame, full stop — it has no higher-depth mode. That's fine for flat animation and terrible for anything photographic, and it's a big part of why a GIF can be so heavy for what it shows. When you're shrinking a GIF with Compress GIF, it squeezes the file with lossy compression rather than by dropping colours — and with the palette already capped this low, that lossy pass is exactly where the dithering and banding tend to show.

When low depth is the right call

Colour depth isn't something to always maximise. A logo, an icon, a simple diagram, a line drawing — these have few colours by nature, so a low depth stores them perfectly at a tiny size. The mistake is only in the other direction: forcing a photograph down to a low colour depth, where the banding gives it away immediately. Match the depth to the content, the same way you'd match the format to the content.

FAQ

What does 24-bit colour mean?
8 bits each for red, green and blue — 256 levels per channel, about 16.7 million colours in total. It's the standard "true colour" depth for photographs, enough that gradients look smooth.

What causes colour banding?
Too few colours to represent a smooth gradient, so the image jumps between the levels it has instead of blending. Lowering colour depth too far on a photo is the usual cause.

Does reducing colour depth lose quality?
It changes the image — that's how it saves space — but on flat graphics the change is invisible. On photographs it shows up as banding, which is why photos are better served by a lossy format than by cutting their colours.

← Back to all guides