What Is Dithering? How Pixel Art Fakes Extra Colors

What Is Dithering? How Pixel Art Fakes Extra Colors

Dithering is a way of faking colors a palette doesn’t have by arranging the colors it does have into a fine pattern. Put black and white pixels in a checkerboard and, from a normal viewing distance, your eye averages them into gray. Every retro look you know, from Game Boy photos to old Macintosh screenshots to grainy GIFs, depends on it.

It matters most when the palette is small. With 256 colors you barely need it. With 4 colors, it’s the difference between a portrait and a set of flat blobs.

Why do you need dithering at all? #

Converting a photo to a small palette means every pixel gets rounded to its nearest available color. That rounding is fine in areas of flat color and a disaster in smooth gradients. A sky that fades from pale blue to deep blue, or a cheek that moves from highlight to shadow, suddenly has only two or three colors to use. The result is banding: hard stripes where the gradient used to be.

Dithering hides those stripes. Instead of every pixel snapping to the same nearest color, the pixels in a transition zone alternate between the two neighboring colors in different proportions. More light pixels where the area should be lighter, more dark where it should be darker. The stripe becomes a smooth-looking ramp of texture.

The trade-off is noise. Dithering adds a visible grain that can look beautiful or messy depending on the pattern and the image.

Where does the word “dither” come from? #

According to Wikipedia’s history of dithering, engineers during World War II noticed that the mechanical computers in bombers worked more accurately in flight than on the ground, because the aircraft’s vibration kept the gears from sticking. They added small vibrating motors to get the same effect and called the jitter “dither,” from the Middle English “didderen,” to tremble. The idea carried into digital images: add a small, deliberate disturbance and the average comes out more accurate.

What are the main types of dithering? #

There are two big families, plus the option of not dithering at all.

No dithering (threshold) #

Each pixel simply becomes the nearest palette color. You get flat, posterized regions with clean edges. It’s the cleanest look and often the best choice for bold, high-contrast photos, logos and sticker designs.

Ordered dithering (Bayer) #

Ordered dithering compares each pixel against a fixed grid of thresholds that repeats across the image. The standard threshold grids are called Bayer matrices, after Bryce Bayer, who published the method in 1973. Common sizes are 2x2, 4x4 and 8x8.

The result is a regular crosshatch pattern that looks unmistakably like an old computer screen. According to Wikipedia’s article on ordered dithering, because the pattern stays fixed relative to the frame, it jitters less than error diffusion in animation, and because it’s repetitive, it compresses better.

Error diffusion (Floyd-Steinberg, Atkinson and friends) #

Error diffusion works through the image one pixel at a time. When a pixel is rounded to a palette color, the difference between what it wanted and what it got (the “error”) is pushed onto the neighbors that haven’t been processed yet. Those neighbors then round a little differently, and the error ripples through the image.

Floyd-Steinberg is the classic. Robert W. Floyd and Louis Steinberg published it in 1976. It scans left to right, top to bottom, and splits each pixel’s error four ways: 7/16 to the pixel on the right, 3/16 below-left, 5/16 directly below and 1/16 below-right. According to Wikipedia’s Floyd-Steinberg article, those weights were found by trial and error, aiming for a 50% gray to come out as a perfect checkerboard. The result is fine-grained and organic.

Atkinson dithering was developed by Apple programmer Bill Atkinson. It spreads the error to six neighbors but only passes on three-quarters of it, throwing the rest away. That makes it crisper and higher-contrast than Floyd-Steinberg. Detail holds up well, but very light and very dark areas tend to blow out to pure white or black. It’s the look of early black-and-white Macintosh images.

We compare those two in detail in Floyd-Steinberg vs Atkinson dithering.

Which dithering should you use? #

MethodPatternStrengthsWeaknessesTry it on
NoneFlat color areasClean, graphic, no noiseBanding in gradientsBold photos, stickers, logos
Ordered (4x4 Bayer)Small regular crosshatchRetro-computer look, stable in animationVisibly artificialGame-screen looks, UI mockups
Bayer 8x8Larger, smoother crosshatchMore in-between levels than 4x4Pattern can dominate small imagesSkies, soft gradients
Floyd-SteinbergFine, organic grainMost detail and smoothest tonesCan look noisy or “wormy”Portraits, scenery, 4-color palettes
AtkinsonCrisp grain, strong contrastSharp detail, classic Mac feelHighlights and shadows clipFaces with strong light, black-and-white

A few rules of thumb:

  • The smaller the palette, the more dithering helps. With the Game Boy’s four greens, Floyd-Steinberg or Atkinson is almost mandatory for faces. With the NES’s larger palette, “None” often looks cleaner.
  • The bigger the pixels, the louder the dither. At a coarse grid, each dither dot is a big visible square. Many people switch dithering off at large pixel sizes.
  • Try more than one. The same photo can look completely different with Atkinson and with Bayer, and there’s no objectively best choice.

How pixel artists dither by hand #

When artists draw pixel art from scratch, they rarely apply an algorithm across the whole image. They dither selectively: a checkerboard band where two colors meet on a shaded sphere, a few scattered pixels to suggest texture on a rock, nothing at all on a flat wall. Algorithmic dithering is a fast approximation of that. If you convert a photo and then clean it up by hand, removing stray dither dots on faces and edges is one of the most effective touch-ups.

Dithering outside pixel art #

You’ve seen dithering in lots of places that aren’t retro art:

  • GIFs. The GIF format is limited to 256 colors or fewer, so image editors often dither photos before saving them as GIFs. That’s the speckled look of old web images.
  • Newspaper photos. Halftone printing is a physical cousin of ordered dithering.
  • Game consoles. Older consoles and handhelds with limited color used dithered patterns to suggest more shades than the hardware could show, which is a big part of why a Game Boy style photo needs dithering to look right.

Try all five on the same photo #

The fastest way to understand dithering is to flip between modes on one picture. Pixelize has five on its Pixel tab: None, Floyd (Floyd-Steinberg), Atkinson, Ordered (a 4x4 Bayer matrix) and Bayer (an 8x8 matrix). The preview re-renders a moment after you tap, and a Compare slider lets you drag between the original and the result. It starts on Atkinson, which suits most photos at the default 8 px grid. If you’re new to the whole process, how to turn a photo into pixel art walks through the other settings.

Frequently asked questions #

Is dithering good or bad? #

Neither. It’s a trade-off between smooth tones and visible grain. For small palettes and photos with gradients it usually improves the result a lot. For bold graphics, text and very large pixels it often just adds noise.

Why does my dithered image look noisy? #

Usually the palette is too small for the photo, the grid is too coarse, or the photo itself is noisy (low light, high ISO). Try raising contrast before converting, switching from error diffusion to ordered dithering, or turning dithering off in flat areas.

What’s the difference between ordered and error-diffusion dithering? #

Ordered dithering uses a fixed repeating threshold pattern, so it looks regular and stays stable across animation frames. Error diffusion passes each pixel’s rounding error to its neighbors, which gives a finer, more natural texture but can shimmer when frames change.

What is the best dithering algorithm for pixel art? #

For converting photos, Floyd-Steinberg and Atkinson usually preserve the most detail, with Atkinson giving a crisper, higher-contrast look. For a deliberate retro-computer aesthetic, a Bayer pattern is the most recognizable. Many hand-drawn pieces use little or no dithering.

Does dithering increase file size? #

Often, yes. Dithered images have more pixel-to-pixel variation, which PNG and GIF compress less efficiently than flat areas. Ordered dithering compresses better than error diffusion because its pattern repeats.