Use the free Image Color Quantizer below: upload a photo, adjust the settings, and download your result as a PNG. Your image never leaves your browser — all editing happens on your device, and nothing is uploaded to any server.
What Does a Color Quantizer Do?
A color quantizer reduces a photo to a small number of colours. A normal photo contains thousands of different colours. A quantized photo contains only the colours you asked for, for example eight. Every pixel is replaced by the nearest colour from the new palette. The picture still looks like the original, but flatter and more graphic.
Designers use quantization for posters, logos and pixel art. Teachers use it to show how digital colour works. Developers use it to shrink images and to build colour palettes. The Image Color Quantizer on this page does the job in your browser, free and without sign-up.
How Median-Cut Quantization Works
This tool uses a classic method called median-cut quantization. It starts by collecting a sample of the photo’s pixels. All of those pixels go into one box in colour space, where each pixel is a point with red, green and blue values.
Then the tool splits the box. It looks at which colour channel, red, green or blue, has the largest range inside the box. It sorts the pixels by that channel and cuts the box in half at the median, so each half holds about the same number of pixels. It repeats the splitting until it has as many boxes as you asked for colours.
Finally it averages the pixels in each box. That average becomes one palette colour. Every pixel in the photo is then replaced by the nearest palette colour. Because the boxes are split where the colour range is widest, the palette spends its colours where the photo actually needs them, not on rare shades.
The tool also shows the palette as hex codes, so you can copy the exact colours into a design program. A photo of a sunset might give deep orange, pink, purple and dark blue. A forest photo might give several greens and one brown. The palette is a honest summary of the photo’s colours.
How to Quantize a Photo
Upload a photo and the tool quantizes it at once with eight colours. Change the number to try other counts. Two colours gives a harsh two-tone poster. Four to eight colours gives a clean graphic look. Sixteen or more colours looks close to the original but still flat and stylised.
Turn the palette display on to see the hex codes under the result. If you like a palette, screenshot it or copy the codes one by one. Then press Download PNG to save the quantized image. You can run the same photo several times with different counts and compare the results.
Tips for Good Results
Photos with large flat areas quantize beautifully: skies, walls, clothing and simple objects. Very detailed photos, like a crowd or a forest floor, can look noisy at low colour counts because many different colours fight for few palette slots. For those, use 16 or 24 colours.
If the result looks washed out, try fewer colours. Fewer colours force stronger choices and a bolder poster look. If the result loses an important detail, like eye colour in a portrait, try more colours or crop closer to the subject before uploading.
Uses for Quantized Images
Quantized images are a starting point for many crafts. Paint-by-numbers templates start from a quantized photo. Cross-stitch patterns do too, because each palette colour becomes one thread colour. Poster designers quantize photos before adding text and shapes.
Developers use quantization to build website colour schemes from a hero image. Teachers use it to explain RGB colour space: the palette is a visible, countable set of colours instead of an abstract idea. Artists use it to study which colours dominate a scene.
Privacy
Your photo never leaves your browser. The median-cut algorithm runs on your device, and the quantized image is drawn on a canvas in the page. Nothing is uploaded, stored or shared.
Frequently Asked Questions
What is the best number of colours? Eight is a good default. Use fewer for posters, more for photos you want to keep realistic.
Does quantization reduce file size? It can, because fewer colours compress better, but the PNG you download here is a full-colour PNG, so the main benefit is the look, not the size.
Can I get the palette as text? Yes. The palette is shown as hex codes under the image when the palette display is on.
Related tools
- Cuantizador de Color de Imágenes (Spanish version)
- Image Pixel Data Exporter
- PNG Background Color Changer
