ToolJovia
Images

Fixed Palette Dither Converter

Convert a local raster to your exact opaque palette using a nearest-color baseline or bounded forward error diffusion.

✓ Browser-local processing

Loading tool…

How to use Fixed Palette Dither Converter

Choose your own colors and compare straightforward nearest mapping with a spatial error-diffusion pattern. Transparency is explicitly flattened over your background before processing, and every output pixel is one entered palette color.

  1. Choose a supported raster, enter unique opaque palette colors and select the transparency background.
  2. Choose nearest mapping or Floyd–Steinberg raster diffusion and run the local operation.
  3. Inspect the derived preview, palette counts and encoded RGB error; download the separate PNG or reset.

Good to know

  • One nonempty static raster up to 4 MiB, with structural preflight before native decoding: checked PNG chunks/CRC, one baseline JPEG frame or simple WebP. SVG, GIF, APNG, progressive JPEG, extended/animated WebP and compressed PNG metadata are refused. Header and decoded dimensions must agree; a JPEG whose native orientation changes its declared width/height is refused.
  • Native preparation/export and Worker preparation each have a 10-second deadline; isolated pixel computation has a 2-second deadline. Reset/page exit aborts the local operation. PNG output is capped at 12 MiB. Original metadata is not copied. Native decoding/Canvas can change color-space and partially transparent samples; this is a derived raster, not archival sample preservation.
  • Files and pixel buffers stay on this device. No upload, input persistence, remote lookup or user code execution. Browser module Workers, ImageBitmap and Canvas are required.
  • At most 1,000,000 source/output pixels, 4,096 pixels per side and 16,000,000 pixel×palette comparisons. A larger palette reduces the admissible pixel count. Colors are 2–32 distinct six-digit RGB hex values; the first listed color wins a computed nearest-distance tie.
  • Alpha flattening and color distance use encoded 8-bit sRGB values, not linear light or a perceptual metric. Diffusion uses Float64 residual rows in left-to-right/top-to-bottom order, without clipping corrected RGB; missing boundary targets are discarded. No serpentine/ordered mode, automatic palette extraction, indexed PNG promise or guaranteed smaller file/better picture.

Common questions

Does the dithered PNG always have lower per-pixel error or a smaller file?

No. Diffusion redistributes residuals into a spatial pattern and can increase per-pixel squared error or PNG size. The report exposes an encoded RGB metric, while the nearest baseline gives a direct comparison; neither is a perceptual-quality guarantee.

What happens to transparent pixels?

They are composited over your entered opaque background before palette mapping. The output is fully opaque and uses only your palette; source alpha is not retained.

Keep going with related tools

All images →