Skip to main content

All processing done locally in your browser

Image Machine logo
Image Machine

Color Quantize — Reduce Image Colors with an Adaptive Palette

Upload an image to reduce its colors

Accepted formats: JPG, PNG, WEBP, BMP, GIF (non-animated)

Upload Image

Paste (Ctrl/⌘+V) or drop an image — or import from a URL

Color quantization reduces a picture to a small set of colors while keeping it as close to the original as possible. Image Machine does it entirely in your browser with median-cut, the classic algorithm behind GIF and PNG palettes. Instead of snapping every channel to a fixed grid, median-cut studies the colors that are actually in your image: it groups them in three-dimensional color space, repeatedly splitting the most spread-out group in half until it has the number of colors you asked for, then paints each group its average color. Because the palette is built from the picture itself, the result keeps the photo's own hues and looks clean and flat rather than dithered or banded. A single slider sets the palette size, from a bold two-color poster up to a subtle 64-color reduction that is hard to tell from the original. Fewer colors mean a stronger graphic, retro or pixel-art look — and a smaller file, which is why color reduction is the first step in optimizing a PNG or GIF. Everything runs locally: your image is never uploaded, there is no sign-up, and there is no watermark.

How It Works

1

Choose a tool

Pick from 120+ tools to resize, convert, compress, or enhance your image.

2

Upload & edit

Drag and drop your image and adjust the settings. It stays on your device.

3

Download

Save your result instantly — no watermark, no sign-up required.

Why Image Machine?

Your files never leave your device

All processing runs locally in your browser. Your images are never uploaded to a server.

Completely free

Every tool is free, with no limits, no watermarks, and no hidden costs.

Lightning fast

No upload waiting — your images are processed instantly on your own device.

Professional quality

Pixel-perfect output with full control over format, size, and quality.

Frequently Asked Questions

What is color quantization?

Color quantization is the process of reducing the number of distinct colors in an image. A photo can contain tens of thousands of colors; quantization picks a small representative palette — say 16 or 32 colors — and remaps every pixel to the closest one. It is how GIF and 8-bit PNG images store their colors, and it is used to create poster and pixel-art looks, to prepare graphics for screen printing, and to shrink image files.

How is this different from Posterize and Dithering?

All three reduce colors, but in different ways. Posterize snaps each red, green and blue channel to an evenly-spaced grid, so the palette is fixed in advance and can drift from the photo's real colors. Dithering also uses a preset palette but scatters the rounding error into neighbouring pixels to fake extra shades, giving a grainy, stippled texture. Color Quantize instead builds an adaptive palette from the colors that are actually in your image and fills each region flat, so it keeps the picture's own hues with clean, solid areas of color.

How many colors should I choose?

It depends on the look you want. Two to eight colors give a bold, graphic poster or screen-print style. Sixteen to thirty-two colors keep a photo clearly recognizable while still looking flat and stylised, which is the sweet spot for most pictures. Up to sixty-four colors gives a gentle reduction that is hard to distinguish from the original but still shrinks the file. Fewer colors always means a smaller download.

Is my image uploaded anywhere?

No. The quantization runs entirely in your browser on the HTML canvas, so your image never leaves your device and the tool keeps working offline once the page has loaded. The median-cut algorithm reads your image's colors, builds the palette, remaps the pixels and exports the result as a PNG — there is no upload, no sign-up and no watermark.

Editing Tools

Vibrance & Saturation

Channel Mixer

Film Grain

Tilt-Shift

Pixel Sort

Ripple