Controls
Quantization is computed manually in JavaScript with canvas pixel data.
Color mode
1-bit
2-bit
4-bit
8-bit
Mapping Logic
Level index = round(pixel × (2b - 1) / 255)
Quantized value = round(level index × 255 / (2b - 1))
RGB mode quantizes each R, G, and B channel separately.
Live Comparison
The original stays unchanged while the quantized canvas updates instantly.