Skip to content

Floyd–Steinberg, Atkinson and Bayer dithering compared

Compare dithering methods for photos, gradients and animation. See how error diffusion, ordered patterns and halftone dots change a limited-colour image.

By ToolsNow · Published

Dithering uses patterns of available colours to suggest shades that are missing from a small palette. It can make a gradient look smoother, though the pattern itself may become visible.

Try Floyd–Steinberg for a photograph, Bayer for a regular pattern and Atkinson for a lighter effect. Compare them on your own image in the dithering tool; the palette and output size matter too.

Two families, and the difference that matters

Error diffusion works through pixels in order. Each one gets rounded to the nearest palette colour, and the leftover error is pushed onto neighbours that haven’t been visited yet, nudging them the opposite way. It’s sequential by construction: pixel 500 depends on pixel 499.

Ordered dithering adds a value from a small repeating tile to each pixel before rounding. Every pixel is independent of every other, so it parallelises perfectly and can run in a shader.

That structural difference drives everything else. Error diffusion adapts to the image and gives you organic, non-repeating texture. Ordered dithering applies the same pattern no matter what the content is, and gives you a visible regular weave.

Floyd–Steinberg

Published by Robert Floyd and Louis Steinberg in 1976, and still the default almost everywhere. The error from each pixel spreads across four neighbours:

        X    7/16
 3/16  5/16  1/16

The weights sum to exactly 1, so all the error is conserved and none of it gets discarded.

Strengths. The best preservation of gradient detail of any common method. Photographs, skies and skin keep their shape, and it adapts to the content automatically.

Weaknesses. In large flat areas it can produce faint diagonal streaks, usually described as “worms”. And because the whole image is one dependency chain, one changed pixel alters everything after it, which makes it a poor choice for animation: consecutive frames end up with completely different dither patterns and the result crawls.

Serpentine scanning, where you alternate left-to-right and right-to-left down the image, cuts the worming noticeably at essentially no cost. Worth knowing if you’re implementing this yourself.

Atkinson

Attributed to Bill Atkinson at Apple, and what the original 512 × 342 one-bit Macintosh display used. Six neighbours, an eighth of the error each:

        X    1/8  1/8
 1/8   1/8   1/8
       1/8

Six eighths. A quarter of the error is deliberately thrown away.

That one decision explains the entire look. Error that would have pulled a region back toward the mean just vanishes, so highlights blow out to white and shadows crush to black, and the mid-tones that survive carry far more local contrast. On a portrait you get the crisp, slightly graphic-novel appearance people recognise instantly from early Mac software.

Use it for line art, logos, high-contrast subjects, and anywhere you want the picture to look confident instead of accurate. Avoid it for images whose subject lives in the extremes: a foggy landscape loses its sky, a dark interior loses its shadow detail.

Bayer (ordered)

Named after Bryce Bayer’s 1973 paper, the same Bayer as the colour filter array in camera sensors. A threshold matrix gets generated recursively, and the 4 × 4 tile is the one you’ll see quoted most often:

 0  8  2 10
12  4 14  6
 3 11  1  9
15  7 13  5

Each pixel is offset by the matrix value at its position modulo the tile size, then rounded. The values are arranged so that as a region darkens, the dots fill in as evenly spread as possible at every level.

One implementation detail matters: the offset should be centred on zero, running from −half to +half rather than 0 to full. An uncentred offset brightens or darkens the whole image, and it’s a surprisingly common bug.

Strengths. Fast, stateless, parallelisable. Because the pattern is fixed, consecutive video or animation frames dither identically, so nothing crawls, and that’s why ordered dithering shows up in real-time rendering. The regular texture also compresses far better than diffusion noise does. And for a certain retro aesthetic, the visible crosshatch is the whole point.

Weaknesses. The pattern is visible, and across a large flat area it reads as a screen door laid over your image. Larger matrices (8 × 8) give finer tone at the price of a more obvious grid up close.

Threshold, for completeness

No diffusion at all. Above the midpoint go white, below go black. Maximum contrast, maximum detail loss. It’s the right answer for scanned text and line art, where you want clean shapes instead of a stippled approximation of grey, and where dithering actively harms legibility.

Halftones are a different thing entirely

Halftoning gets lumped in with dithering constantly, and it works on a different principle. Dithering picks between available colours pixel by pixel. A halftone replaces regions with shapes whose area encodes brightness, which is the technique that lets a printing press reproduce a photograph using one colour of ink, since ink is either present or absent and can’t be grey.

Two consequences follow.

Dot area, not radius, is proportional to darkness. Ink coverage goes as the square of the radius, so the radius has to go as the square root of darkness. Use darkness directly for the radius and your mid-tones come out far too dark. That’s the classic naive-halftone mistake, and the reason so many of them look like everything was photographed at dusk.

The screen angle matters. A dot grid at 0° lines up with the image’s own rows and produces strong moiré against any horizontal detail. The printing trade settled on 45° for single-colour work, the angle where the eye is least sensitive to a regular pattern. Colour separations get set at different angles from each other, traditionally about 15° apart, with yellow (the least visible ink) given the most conspicuous angle, so that the four screens can’t form a moiré with one another.

Choosing, briefly

SituationMethod
Photograph, one still imageFloyd–Steinberg
Line art, logo, high contrastAtkinson or threshold
Animation or videoBayer — no crawling between frames
Retro game aestheticBayer, visible on purpose
Scanned textThreshold
Print or newsprint lookHalftone at 45°
File size mattersBayer, or no dithering

The palette matters more than the method

One last thing, because it’s easy to spend an hour on the wrong variable. Dithering can only mix the colours you hand it. Two well-chosen colours will beat sixteen badly chosen ones, and no amount of switching between diffusion kernels rescues a palette with nothing near the image’s dominant hues. Get the palette right first. The method is the finishing touch.

Sources and further reading

Last reviewed 31 July 2026.

More help with this topic

Published by ToolsNow. Read how tools and sources are checked.

Found a mistake or an outdated detail? Send a correction with the article title and the detail to review.