Skip to main content
BVDART Logo
← All guidesDithering & palettes

Dithering

Dithering distributes quantization decisions across neighboring pixels so a limited set of stored colors can suggest additional tones at viewing distance.

Compare four ways to express one missing gray

Target white coverage37.6%
Stored palette0 / 255
Hard threshold: 0.0% white
Hard threshold0.0% whiteMean error: -96.00 / 255
Ordered / Bayer: 37.5% white
Ordered / Bayer37.5% whiteMean error: -0.38 / 255
Floyd–Steinberg: 37.4% white
Floyd–Steinberg37.4% whiteMean error: -0.62 / 255
Seeded random: 36.2% white
Seeded random36.2% whiteMean error: -3.61 / 255
mean = (Nwhite / 1024) × 255All four patches receive the same constant tone. Only two stored values are allowed. Their spatial decisions change both texture and finite-patch average.

Bayer repeats a 4 × 4 threshold tile. Diffusion carries signed error forward and loses some at image borders. The random patch uses a fixed seed, so moving the tone reveals the same underlying random field.

Sweep one gray tone across four binary methods and compare their texture, coverage and mean error. Use any control to take over.

What to try
  1. Move the requested gray level while all patches keep the same two stored colors.
  2. Switch to the distant view and compare texture, white coverage and mean error.
Open in the Lab ↗

What to look for: Hard thresholding loses intermediate tones. Ordered, diffused and seeded-random decisions trade different textures and finite-patch errors for a closer average.

How it works

Error diffusion quantizes a pixel and sends a weighted part of the remaining error to future pixels. Floyd–Steinberg uses a compact stencil; Jarvis–Judice–Ninke, Stucki, Sierra and Burkes distribute error over different neighborhoods. Atkinson distributes only three quarters of the error, deliberately changing tonal behavior.

Ordered dithering compares a signal with a repeating threshold matrix. Stochastic dithering varies the decision with seeded noise. Clustered halftoning forms larger marks. Each produces a recognizable texture; the right choice depends on scale, palette and the role of the pattern in the artwork.

Use it in the Lab

In the Lab, use the Dithering category for algorithm choice and parameters. Preview at the final scale and also at integer zoom to inspect the actual marks. A cashier key plays one fixed setting, while the category exposes the underlying method.

Limits & distinctions

Dithering cannot recover lost source detail. Resizing a dithered image with smoothing can destroy its intended pattern, so perform major geometric changes first.

Further reading

Dithering is a fundamental technique in digital imaging that creates the illusion of color depth and tonal gradation beyond what a limited palette can directly represent. By strategically arranging pixels in spatial patterns or distributing quantization errors across neighboring pixels, dithering exploits the human visual system's tendency to blend nearby colors when viewed at a distance.

Historical Origins

The roots of dithering predate digital computing, originating in the print industry where halftone screens were used to reproduce continuous-tone photographs using only black ink on white paper. By varying the size and spacing of dots, printers could simulate grayscale images—a technique that remains fundamental to offset printing today.

With the advent of early computer graphics in the 1970s and 1980s, dithering became essential for displaying images on hardware with severe color limitations. Early personal computers often supported only 2, 4, or 16 colors, making dithering crucial for rendering photographs, gradients, and realistic imagery. The term "dithering" itself comes from the Old English word meaning "to tremble," reflecting the visual vibration created by alternating pixels.

Two Main Families

[ LOADING VIS ]
Pattern artifact tradeoffs under constraints

Dithering techniques fall into two primary categories, each with distinct characteristics and applications.

Ordered Dithering

[ LOADING VIS ]
Threshold vs ordered vs diffusion overview

Ordered dithering applies a fixed threshold matrix—most commonly a Bayer matrix—to determine whether each pixel should be rounded up or down to the nearest available color. The Bayer matrix, developed by Bryce Bayer in 1973, arranges threshold values in a specific pattern that disperses quantization errors uniformly across the image.

This approach is computationally efficient and produces consistent, repeating patterns. The resulting images have a characteristic crosshatch or stippled appearance, with visible regular structures that become more apparent at lower resolutions. Ordered dithering is particularly effective for textures and can be implemented in real-time applications due to its simplicity.

Error Diffusion

[ LOADING VIS ]
Error diffusion flow and neighbor propagation in practice

Error diffusion algorithms, pioneered by Floyd and Steinberg in 1976, take a fundamentally different approach. These algorithms process pixels sequentially, calculating the quantization error at each pixel and distributing it to neighboring unprocessed pixels according to specific weights. This "pushes" the error forward through the image, allowing subsequent pixels to compensate for previous approximations.

Error diffusion produces more organic, less structured results than ordered dithering. The patterns appear more random and natural, with better preservation of edge detail and tonal gradations. However, this quality comes at the cost of increased computational complexity and the potential for artifacts like worm-like patterns in smooth gradients.

Exploiting Human Visual Perception

All dithering techniques rely on fundamental properties of human vision. The eye's limited spatial resolution means that fine patterns blend together when viewed from an appropriate distance, a phenomenon called spatial integration. When alternating pixels of different colors are placed adjacent to each other, the visual system perceives an intermediate color that doesn't actually exist in the palette.

This perceptual blending is most effective when the dither pattern frequency exceeds the eye's resolution limit at the viewing distance. The technique essentially trades spatial resolution for color depth—using the arrangement of pixels in space to encode information that would otherwise require more bits per pixel. This makes dithering a form of perceptual compression, optimized for human observers rather than mathematical accuracy.

Contemporary Aesthetic Revival

While modern displays can render millions of colors with ease, dithering has experienced a renaissance as an intentional aesthetic choice in digital art. Contemporary artists embrace dithering not out of technical necessity, but for its distinctive visual character and nostalgic associations with early computer graphics.

The limited color palettes and visible pixel patterns of dithered images evoke the aesthetics of 1980s and 1990s computing, creating a retro-futuristic quality that resonates with audiences. Artists use dithering to reduce visual complexity, create texture, and establish a specific mood or time period. The technique has become particularly prominent in pixel art, indie game development, and generative art, where constraints are often embraced as creative opportunities.

This aesthetic revival demonstrates how technical limitations can transform into artistic languages. What was once a workaround for hardware constraints has become a deliberate stylistic choice, proving that the visual artifacts of computational processes can carry cultural meaning and emotional resonance beyond their original functional purpose.

Related artworks

Sources & references

Guide updated