Dithering

Dithering fakes a full range of tones with only two colors, or a small palette, by arranging dots cleverly. This page explains every dithering algorithm in Bitgrain, diffusion strength, palettes, why resolution changes everything, and a set of recipes to start from.

How dithering works in Bitgrain

Imagine you can only print black or white. Rounding every pixel to the nearest of the two gives you harsh, flat blobs. Dithering rounds the same way, but hides the rounding mistakes in a pattern of dots, so from a normal viewing distance your eye blends them back into greys.

Bitgrain's dither effect works on the working grid:

  1. Your adjustments are applied first.
  2. Each cell is measured by its luminance (how bright it looks), or by its full color if you picked a palette.
  3. Without a palette, the tones are gently stretched so the darkest and lightest parts of the photo reach full ink and full paper, and fine detail is sharpened a little. This keeps flat, low contrast photos from turning into mush.
  4. The algorithm decides, cell by cell, which tone or palette color it becomes.
  5. The result is drawn as a grid of hard-edged 2 x 2 px dots.

Without a palette, a cell is compared against the midpoint and becomes ink or paper. With a palette, it becomes the palette color that looks closest to the eye. What changes between algorithms is how they decide, and that decision is the whole character of the look.

Where to find it

WorkspaceWhereAlgorithm pickerStrength control
Image editorOpen the effects menu on the toolbar and pick ditherTwo groups, "Error diffusion" and "Ordered"Diffusion strength, 10% to 200%, default 100%
Video editorAdd the Dither effectMethod menuIntensity, 0.1 to 2, default 1
StudioBitgrain effects, then DitherMethod menuIntensity, 0 to 4, default 1

The image editor names a few methods differently from the video editor and Studio: "Sierra two-row" is Sierra 2, "Bayer 4×4" is Bayer 4x4, and "Jarvis-Judice-Ninke" is JJN. The headings below use the video and Studio names. In the image editor, the method you pick shows a one line description under the list. The image editor starts on Atkinson, while the video editor and Studio start on Floyd-Steinberg.

The dither effect also has a color switch:

WorkspaceControlDefault
Image editorKeep colour in the colour menuOn
Video editorSource colorOn
StudioColorOff

Dither factor

The dither factor, labelled Diffusion strength in the image editor and Intensity in video and Studio, scales how much of each cell's rounding error is passed on to its neighbours.

Note: Strength is meant for the eight error diffusion methods. Bayer, blue noise, threshold and random never spread error, so the image editor hides the slider when one of them is picked and shows "Strength only changes error diffusion methods. Ordered patterns are fixed." instead.

Error diffusion

Error diffusion methods walk the grid one cell at a time. For each cell they pick the nearest tone, measure the difference (the error), and push fractions of that error onto cells they have not visited yet. Neighbours that received extra darkness are more likely to become ink, so tone is preserved on average.

Bitgrain scans in a serpentine path: left to right on even rows, right to left on odd rows. This avoids the diagonal "rain" that a one-way scan leaves in flat areas. In black and white, the midpoint each cell is compared against also wobbles very slightly, which breaks up the worm-like chains error diffusion can leave in smooth tones.

The algorithms differ in how far the error travels and how it is weighted. Wider kernels (the pattern of neighbours that share the error) give smoother gradients and less visible structure. Smaller ones give crisper, grainier dots.

Floyd-Steinberg

The classic from 1976. The error goes to four neighbours: 7/16 to the right, and 3/16, 5/16 and 1/16 to the three cells below.

Atkinson

Developed for the original Apple Macintosh. Six neighbours each receive 1/8 of the error, which adds up to only 6/8. A quarter of the error is thrown away on purpose.

Sierra

The full three-row Sierra kernel, spreading error across ten neighbours (weights in 32nds).

Sierra 2

The two-row Sierra variant, seven neighbours (weights in 16ths).

Sierra Lite

The smallest kernel in the set: half the error goes right, a quarter to each of two cells below.

Stucki

Twelve neighbours across three rows (weights in 42nds), with more weight near the center than JJN.

Burkes

A simplified Stucki that uses only two rows, seven neighbours (weights in 32nds).

JJN

Jarvis, Judice and Ninke's kernel: twelve neighbours across three rows (weights in 48ths), the widest spread of the group.

Ordered and threshold methods

These methods decide each cell on its own, by comparing it to a threshold. No error is passed around, so there are no streaks and no worms, and one cell never affects another. That makes them stable: move part of the image and the rest does not change. It is also why they hold up well in animation.

In the image editor, these six sit under the "Ordered" heading.

Bayer 2x2

A tiny repeating 2 x 2 threshold pattern, so only five distinct tone levels are possible.

Bayer 4x4

A 4 x 4 pattern giving 17 tone levels.

Bayer 8x8

An 8 x 8 pattern giving 65 tone levels.

Blue noise

A 64 x 64 threshold tile arranged so dots spread evenly with no obvious grid and no clumps.

Threshold

No dithering at all. Every cell is simply ink or paper depending on whether it is darker or lighter than the midpoint. With a palette, each cell just becomes its nearest palette color.

Random

Each cell is compared against a noise threshold, so tone becomes pure static.

Choosing an algorithm

You wantTry
A safe photographic resultFloyd-Steinberg
Punchy black and white with clean highlightsAtkinson
The smoothest possible gradientsJJN or Sierra
Crisp detail for printStucki or Burkes
Retro console graphicsBayer 4x4 with a console palette
A woven, patterned screenBayer 8x8
Natural grain that stays still in videoBlue noise
A stencil or posterThreshold
Noise and gritRandom

Color, colorize and palettes

Dithering has three color behaviours, depending on the color switch and the palette:

  1. No palette, color off. Pure two-tone: ink cells are black, paper cells show the paper color.
  2. No palette, color on. The decision is still made in black and white, but ink cells take the original color of that spot in the photo. You get colored dots on paper, like a screenprint.
  3. Palette chosen. The algorithm works in full color against the palette colors, measuring how close two colors look to the eye rather than comparing raw numbers, and error diffusion spreads the color error, so the palette mixes optically into shades it does not contain. Every cell is painted in its palette color, including light ones, so pale palette entries such as pink, cream or yellow show up exactly as chosen.

In the image editor, open colour on the toolbar, then Palette. "No palette" turns palettes off. The list shows these palettes:

PaletteColorsPaletteColors
Gameboy DMG4Thermal7
NES56Forest6
C6416Arctic6
Apple II16Vaporwave6
CGA4Neon6
PICO-816Noir6
ZX Spectrum15Vintage6
MSX16Amber CRT6
Risograph8Green CRT6
Gameboy Pocket4Sepia7
Duotone Magenta6Cyanotype7
Sunset6Mono Cream5

Generate from image (the pipette button at the bottom) samples the current output and builds an 8-color palette from it, skipping near-black pixels. It appears in your look as "Aura Gen".

Tip: Palettes with few colors dither most visibly. Error diffusion with a 4-color palette gives the richest texture. Ordered dithering with a 16-color palette gives the cleanest retro look.

A palette is also enforced on the final output of every effect, not just dithering. See palette enforcement.

Why resolution matters

Dithering happens on the working grid, not on your full-size photo. In the image editor the grid is 0.4 x image width x Detail cells across (the Detail slider lives in adjust), and each cell is drawn as a 2 x 2 px dot. The grid is capped at 2,000 cells on the long edge.

For a photo 3,000 px wide:

DetailGrid widthWhat you see
25%300 cellsBig, chunky dots. Very graphic, little detail.
100%1,200 cellsBalanced. Dots visible up close, tone reads well.
200%2,000 cells (capped)Fine dots, lots of detail, reads almost like grain.

Every algorithm looks different at each size. Atkinson and Bayer patterns come alive at low resolution, where each dot is visible. JJN and Stucki shine at higher resolution, where their smoothness has room.

When you export, the dither grid is not recalculated. Bitgrain renders the same grid you see and enlarges it with nearest-neighbour scaling, so your export has exactly the dots from the preview, just bigger and still perfectly sharp. That is also why a dither at low Detail exported at 4x is a crisp pixel-art file rather than a blurry one. See scaling up for export.

Recipes

These use only controls from the image editor. Treat them as starting points.

Classic Mac

  1. Open the effects menu, pick dither, then Atkinson.
  2. In colour, turn Keep colour off. Leave Palette on "No palette".
  3. In adjust, set Detail around 60%, Contrast 1.4x, Saturation 0x.

Handheld console

  1. Pick dither, then Bayer 4×4.
  2. Choose the Gameboy DMG palette.
  3. Set Detail to 25% to 40% so each dot reads as a pixel.

Newspaper photo

  1. Pick Stucki or Floyd-Steinberg.
  2. Turn Keep colour off, set Contrast to 1.3x.
  3. Switch on paper in the toolbar for a paper tone and slight misregistration. Choosing dither switches paper texture off, so turn it on after picking the method.

Screenprint in color

  1. Pick Floyd-Steinberg with Keep colour on.
  2. Raise Saturation to 1.5x and Contrast to 1.3x.
  3. Drop Diffusion strength to 70% for flatter, poster-like areas.

Glitchy worms

  1. Pick Sierra lite or Burkes.
  2. Push Diffusion strength to 180% or more.
  3. Try the Vaporwave or Neon palette.

Cyanotype blueprint

  1. Pick Blue noise.
  2. Choose the Cyanotype palette.
  3. Set Detail to 100% and Contrast to 1.5x.

Tip: Save a look you like as a preset so you can reuse it. See presets and recipes.

More documentation