Effects

Dither

The picture below in chunky pixels and a few colours: a Bayer matrix, blue noise or gradient noise turns halftones into a dot pattern.

  • effect
  • seamless tile
Open in the editor →

When colours are scarce — two on the first Macintosh, four shades on the Game Boy — tone has to be faked with a pattern that the eye averages. That is dithering: it carried 8- and 16-bit games and 256-colour GIFs, and still hides banding in video-game gradients.

How it works

The picture is cut into coarse pixels (“Pixels” counts them across the short side), each with its two nearest colours, A and B. A threshold t from a mask decides: if the tone has moved past t from A towards B, the pixel shows B. The character lies in how thresholds are laid out.

The Bayer matrix is recursive: each size places the previous one into four quadrants in the order 0, 2, 3, 1, giving an even cross-stitch where 50% is a perfect checkerboard. Blue noise is a 32×32 mask built on load by void-and-cluster: on a torus it keeps finding the tightest cluster of dots and the largest void, and the order in which dots are removed and added becomes the threshold. It lacks low frequencies — grain without clumps or grid.

“Palette” mode picks the pair of document colours whose OKLab mix best matches the pixel, penalising far-apart pairs. Error diffusion is left out on purpose: it runs pixel by pixel and boils in animation, while a mask holds still from frame to frame.

B₁ = 0, B₂ₙ = ⎡ 4Bₙ 4Bₙ + 2 ⎤ ⎣ 4Bₙ + 3 4Bₙ + 1 ⎦ t = (B + ½) / n², t′ = ½ + (t − ½)·“Strength” pixel = B if B's share of the mix > t′, else A

A bit of history

Bryce Bayer of Kodak published his matrix in 1973 — the same Bayer whose colour filter sits in nearly every digital camera. In 1976 Robert Floyd and Louis Steinberg proposed error diffusion: round the pixel and pass the error to its neighbours with weights 7/16, 3/16, 5/16 and 1/16. In 1987 Robert Ulichney showed that the best pattern is “blue”, free of low frequencies; in 1993 he devised void-and-cluster. Jorge Jimenez described interleaved gradient noise in 2014 for Call of Duty: Advanced Warfare, and Lucas Pope's 1-bit Return of the Obra Dinn (2018) proved that dithering is also a style.

What to tweak

  • “Threshold”: “Bayer 4×4” and “Bayer 8×8” are the old-game look, “blue noise” is print-like grain, “gradient noise” a fine diagonal ripple.
  • “Colours” set to “1-bit” with “Pixels” around 300 is an early Mac; “RGB levels” with “Levels” at 2 gives the eight colours of the first home computers.
  • “Strength” 0 turns the pattern off, leaving bare posterisation — see how many tones dithering recovers.
  • Smooth Mesh gradient and Fractal noise show best how the pattern carries tone; over Strange attractors 1-bit turns a cloud of points into an engraving.

Parameters

Colours
palette · 1-bit · RGB levels
Threshold
Bayer is an even grid, like old games; blue and gradient noise are grainier and livelier Bayer 2×2 · Bayer 4×4 · Bayer 8×8 · blue noise · gradient noise
Pixels
How many pixels fit across the short side — from chunky pixel art to fine print
Strength
Zero — just the nearest colour, no pattern
Contrast
Levels
Steps per channel in RGB mode
Ink
For 1-bit mode
Paper
For 1-bit mode