How dithering works — fewer colours that look like more

Take a photo down to 16 colours and it turns into flat bands with hard edges. Dither it and the same 16 colours look like a smooth photograph — grainy, but smooth. Dithering is a trick from the era of 8-bit displays that still runs inside printers, e-readers and audio converters, and the image dither tool makes it visible.

The problem: banding

A gradient from black to white passes through thousands of greys. With only 16 available, every pixel snaps to the nearest one and the gradient becomes 16 flat stripes — banding, or posterisation (the posterize tool does it on purpose). The eye is sensitive to the sudden edges between stripes and reads them as a defect, even though the average brightness across the image is right.

The idea: trade banding for noise

Instead of rounding every pixel independently, dithering scatters the rounding so that, over any small area, the mix of light and dark pixels averages to the intended tone. Viewed from normal distance, the eye blurs the pattern and sees the average — a mid grey made of black and white dots looks grey. The cost is visible grain; the gain is that gradients and skin tones survive with a handful of colours. It is the same principle as halftone printing in newspapers and the half-toning inside every inkjet, which has only a few ink colours and produces photographs by dot patterns.

Ordered versus error diffusion

  • Ordered (Bayer) dithering compares each pixel against a fixed threshold matrix that tiles across the image. Fast, deterministic, and produces a regular crosshatch pattern that reads as retro — the look of early Mac and game graphics.
  • Error diffusion (Floyd–Steinberg, 1976) rounds each pixel, computes the rounding error, and pushes it onto the neighbouring unprocessed pixels (7/16 right, 3/16, 5/16 and 1/16 to the row below). The error keeps propagating, so the local average is preserved exactly and the pattern is organic rather than gridded. Variants (Atkinson, Jarvis, Stucki) spread the error differently for finer grain or more contrast.
  • Random dithering adds noise before rounding — simplest, and the noisiest.

Where dithering is still used

GIFs: with 256 colours per frame, every animated GIF of a photo is dithered (Why GIFs are so big, and when a muted video is the better choice). E-ink displays with 16 greys. Thermal and inkjet printers. Audio: when reducing bit depth from 24 to 16 bits, a tiny noise is added before rounding so quantisation error becomes benign hiss rather than distortion — the same idea in one dimension (Sample rate and bit depth explained: what 44.1 kHz and 16-bit actually mean). And design: the 1-bit look — pure black and white with Floyd–Steinberg grain — has come back as an aesthetic, which is how most people meet the tool.

Getting a good result

Resize to the final display size first: dithering patterns are per pixel, so scaling a dithered image afterwards smears them into mud. Raise contrast slightly before dithering; error diffusion flattens it a little. For the retro look, use ordered dithering with a 2- or 4-colour palette; for a faithful small-palette image, Floyd–Steinberg with the largest palette the destination allows. Save as PNG or GIF — JPEG's compression fights the grain and produces a mess (How JPEG compression works — and what the quality slider really does). The pixel art scaler enlarges the result without blurring the dots.

Sources and further reading

The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.

  1. Dither — Wikipedia
  2. Floyd–Steinberg dithering — Wikipedia

Try the tool

Frequently asked questions

What does dithering do to an image?

It scatters the rounding when colours are reduced so that small areas average to the right tone. Gradients look smooth instead of banded, at the cost of visible grain.

What is Floyd–Steinberg dithering?

An error-diffusion method: each pixel's rounding error is pushed onto its neighbours, preserving local averages and producing an organic, non-gridded pattern. The standard for quality.

Why does my dithered image look bad after resizing?

The pattern is pixel-level; scaling blurs it. Resize first, dither last, and save as PNG or GIF.

Is dithering used in audio?

Yes — a small noise is added before reducing bit depth so quantisation error becomes benign hiss rather than distortion.