Dithering for Pixel Art: Floyd-Steinberg vs Ordered
A practical explanation of dithering. When to use Floyd-Steinberg vs ordered dithering, and how to keep results clean (especially for photos).
Grid, file size, and color controls
For icons, start with a 16×16 or 32×32 Target grid and the same file size. The logical grid is independent of source resolution. File sizes can be whole-number multiples of that grid; Preview zoom changes only the display. Check the 1× actual-size preview on light and dark backgrounds.
Keep full image adds transparent padding. Center crop keeps the centered square and shows the removed edges. Free pixel multiplier depends on source size: each grid dimension is the source dimension divided by the multiplier, rounded up. Multiplier numbers in older examples are starting points for a particular source, not universal icon settings.
Nearest, Floyd-Steinberg, and Ordered use the selected fixed palette. maxColors only controls Median cut, which creates adaptive colors from the image and ignores the fixed palette. PNG preserves exact colors and alpha. JPEG uses white behind transparency; JPEG/WebP compression can change colors.
Quick presets
What dithering does
Dithering simulates extra colors by placing pixels in patterns. It helps photos keep shading when you reduce colors and palette size.
Which one to use (by input type)
Pick based on your source and the look you want.
- Photo → Floyd-Steinberg (natural shading, can look grainy)
- Gradients / retro patterns → Ordered (clean pattern)
- Logo/UI → Nearest (no dithering, crisp edges)
How to keep it clean
If dithering looks too noisy, don’t give up—use these tweaks.
- Increase pixel size slightly (noise becomes pattern)
- Use a smaller fixed palette. Only Median cut has an adjustable maxColors limit.
- Use a fixed palette (PICO-8 / NES) for consistent results
Advertisement