Loading Dither Demo...

Initializing WASM module...

Dithering Demo

Error diffusion dithering with configurable bit depth per channel

Click to upload or drag and drop

Dither Settings

Color Space Aware:

Uses perceptual distance for candidate selection with linear error diffusion. For RGB, processes channels jointly. For grayscale: CIE76=CIE94 (simple ΔL²), CIEDE2000 uses lightness-dependent weighting, OKLab uses different L curve.

Overshoot Penalty:

Penalizes quantization choices that would cause the opposing point to fall outside the color gamut. Reduces color fringing artifacts.

Controls random kernel selection in Mixed modes. Each channel uses a different derived seed.

Row stride aligns each row to the specified byte boundary. Stride 1 means packed (no padding). Padding fill also affects RGB666 partial groups (4-pixel boundaries).

Downscale:
x

Rescaling is performed in linear RGB space for correct color blending.

Upscale for viewing:
x

Integer upscaling with nearest neighbor for pixel-perfect viewing.

Red Channel

3 bits (8 levels)

Green Channel

3 bits (8 levels)

Blue Channel

2 bits (4 levels)

Grayscale

4 bits (16 levels)

Processing image...