Reference

Color quantization

Color quantization reduces the number of distinct colors in an image to a smaller palette, mapping each pixel to the nearest remaining color. It is how an 8-bit PNG shrinks: fewer colors means a smaller file, at the cost of some color accuracy and possible banding.

Editing & toolsGeneral

Color quantization

Also known as: color reduction, palette reduction, indexed color, png-8 quantization

Color quantization reduces the number of distinct colors in an image to a smaller palette, mapping each pixel to the nearest remaining color. It is how an 8-bit PNG shrinks: fewer colors means a smaller file, at the cost of some color accuracy and possible banding.

  • Reduces an image to a smaller color palette
  • How 8-bit PNG files get smaller
  • Too few colors causes banding; dithering hides it

How quantization shrinks files

A full-color image can contain millions of distinct colors. Quantization picks a limited palette — for example, the 256 colors of an 8-bit PNG — and remaps every pixel to the closest one. Storing palette indexes instead of full color values makes the file much smaller.

Smart quantizers choose the palette that best represents the specific image rather than a fixed set, so the loss is far less visible than the raw color count suggests.

Trade-offs and dithering

Reducing colors too far causes banding — visible steps in smooth gradients like skies. Dithering hides this by scattering palette colors in a pattern that the eye blends into intermediate shades, trading a little noise for smoother-looking transitions.

Quantization works best on graphics, logos, and screenshots with limited colors. Photographs with rich gradients usually compress better as JPEG, which is built for continuous tone rather than a fixed palette.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.