About Dither
What is Dithering?
Dithering is a technique used in computer graphics to create the illusion of color depth in images with a limited color palette. By applying a pattern of different colored pixels, dithering approximates the colors that cannot be directly displayed, creating a visual blend that appears closer to the original image when viewed from a distance.
This technique is particularly important when working with limited color palettes, such as in retro computing, pixel art, or when optimizing images for file size reduction while maintaining visual quality.
The Mathematics Behind Dithering
At its core, dithering is a mathematical solution to a quantization problem. When reducing an image from millions of colors to a limited palette (e.g., 256 colors or less), a direct mapping would cause significant information loss and visible banding artifacts. Dithering algorithms solve this by:
- Quantization Error Calculation: For each pixel, the algorithm calculates the difference between the original color value and the closest available color in the limited palette.
- Error Distribution: This quantization error is then distributed to neighboring pixels according to specific mathematical patterns or formulas.
- Spatial Integration: The human eye naturally blends closely positioned pixels, performing an unconscious spatial integration that perceives the dithered pattern as a mixture of the available colors.
For example, in Floyd-Steinberg dithering, the quantization error is distributed to neighboring pixels with the following fractional weights:
X 7/16 3/16 5/16 1/16
Where X is the current pixel, and the fractions show how the error is distributed to unprocessed neighboring pixels.
Origins and History
The concept of dithering dates back to the early days of computing in the 1960s and 1970s when display hardware had severe color limitations. The term "dither" actually comes from audio processing, where it was used to reduce quantization error in analog-to-digital conversion.
In 1973, researchers at Bell Labs developed one of the first digital dithering techniques. Later, in the 1980s, as personal computers became more widespread but still had limited color capabilities (often just 16 or 256 colors), dithering became essential for displaying photographic images.
Early computer systems like the Apple Macintosh, Commodore Amiga, and early Windows PCs all relied heavily on dithering to display images with apparent color depth beyond their hardware capabilities.
Dithering Algorithms
Ordered Dithering (Bayer)
Uses a predetermined matrix pattern to determine thresholds for each pixel. Creates a structured, cross-hatch like pattern that's computationally efficient but can appear more regular and grid-like.

Floyd-Steinberg
A popular error-diffusion algorithm that propagates quantization errors to neighboring pixels. Creates a more natural-looking result with fewer patterns, but can introduce "serpentine" artifacts.

Atkinson
Developed for early Apple Macintosh computers, this algorithm diffuses only a fraction of the error to neighboring pixels, resulting in cleaner output with better contrast but less accurate color representation.

Stucki
An enhanced error diffusion algorithm that spreads error to a wider range of pixels (12 neighbors). Often produces sharper results than Floyd-Steinberg but can be noisier in some areas.

Burkes
A simplified version of Stucki that uses fewer neighboring pixels, making it faster while still producing good quality results. A good balance between speed and quality.

Random Dithering
Adds random noise to pixel values before quantization. Simple but typically looks noisy and unstructured. Can be useful for creating texture or grain effects.

Halftone
Simulates traditional printing techniques by using dots of varying sizes. Creates a distinctive look reminiscent of newspapers and magazines. Can be configured for CMYK color separation.

Blue Noise
Uses noise with minimized low-frequency components for visually pleasing, less structured results. Often considered the highest quality dithering method but can be more complex to implement.

Color Quantization and Efficiency
Dithering is intimately connected with color quantization—the process of reducing the number of colors in an image. This combination addresses two fundamental challenges in digital imaging:
- Representational Efficiency: By using a limited palette (e.g., 8-bit color instead of 24-bit), images can require significantly less storage space and memory.
- Perceptual Quality: Through the strategic distribution of quantization errors, dithering creates an illusion of depth that exploits the human visual system's tendency to blend adjacent colors.
The efficiency of dithering comes from this perceptual hack: rather than storing exact color information for each pixel (requiring more bits), it uses carefully calculated patterns of limited colors that our eyes blend into a perceived match of the original image.
For instance, an 8-bit (256 color) dithered image might appear nearly indistinguishable from a 24-bit (16.7 million color) original when viewed at normal distances, despite requiring only 1/3 of the storage space.
Modern Applications
While modern displays can show millions of colors, dithering remains relevant for several reasons:
- File size optimization - Reducing color depth with dithering can significantly decrease image file sizes while maintaining visual quality.
- Pixel art and retro aesthetics - Artists deliberately use dithering to create stylized graphics reminiscent of vintage computing.
- Print media - Halftone dithering remains essential in printing, where CMYK inks must create the illusion of continuous tones.
- Low-power displays - E-ink screens and other low-power displays often use dithering to simulate grayscales or colors.
- Texture generation - Game developers use dithering patterns to create texture and detail in 3D models and environments.
About This Tool
Dither is a modern web-based image dithering tool designed to make these classic algorithms accessible to everyone. Whether you're a digital artist looking to create retro-styled graphics, a developer optimizing images, or just curious about image processing techniques, Dither provides an intuitive interface to experiment with various dithering methods.
All processing happens directly in your browser - no images are uploaded to any server, ensuring your privacy and providing instant results. The tool is built with modern web technologies and is completely open source.