Have you ever wondered why retro video games looked like they had more colors than they actually did? Or why old computer monitors could display rich, photorealistic images despite severe color limitations? The answer is dithering - one of the most elegant hacks in computer graphics history.
The Color Problem of the 1970s and 80s
Imagine you're trying to display a photorealistic image on a monitor that can only show 256 colors (or even fewer). Your photograph has millions of colors, but your display is stuck with 256. What do you do? You can't just round each pixel to the nearest available color - the result would be a posterized, banded mess with harsh color transitions.
This was the exact problem engineers faced in the early days of computing. Early graphics cards, scanners, and even early digital cameras had severe color limitations. Dithering was invented as a solution.
How Dithering Works: Tricking Your Eyes
Dithering relies on a fundamental property of human vision: our eyes blend nearby pixels together. If you place a red pixel next to a blue pixel at the right spacing, from a distance, your eye perceives purple - even though the screen never displayed purple at all.
By carefully placing colored pixels in a strategic pattern, dithering makes a limited palette appear to have far more colors than it actually contains. It's optical illusion married to mathematics.
Types of Dithering Algorithms
Error Diffusion Dithering: These algorithms calculate the difference (error) between a pixel's true color and the nearest available color, then distribute that error to neighboring pixels. The most famous is Floyd-Steinberg (1976). This produces natural-looking results that preserve fine detail.
Ordered Dithering: Also called patterned dithering, these use predefined matrices (like the Bayer matrix) to decide which pixels to turn on or off. The result looks more structured but is computationally cheaper. This is what you see in old halftone newspaper prints.
Threshold Dithering: The simplest approach - just round each pixel to the nearest color. Fast, but usually looks terrible without other techniques.
Dithering in Practice Today
While modern displays have millions of colors, dithering hasn't disappeared. It's still used in:
- Web graphics: Converting images to indexed PNG for smaller file sizes
- Print design: Halftone dithering in offset printing
- Retro aesthetics: Artists deliberately apply dithering to create a nostalgic 8-bit or 16-bit look
- E-ink displays: E-readers use dithering to display grayscale images
The aesthetic has become cool again. What was born from hardware limitations is now a celebrated art style.
Ready to try it? Open GlitchArt Studio and experiment with this effect.