Image Palette Generator

Extract the dominant colors from any image as a palette of hex codes you can copy or download.

Drag & drop an image here, or click to browse

No uploads. Your files stay on your device.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Drop a photo and its color palette appears instantly. The image is drawn onto a small canvas, the pixels are sampled, and the median-cut algorithm groups similar colors into the number of swatches you pick with the slider — ordered by how much of the image each color covers, so the most dominant color comes first. Click any swatch to copy its hex code, copy the whole palette as plain hex values or CSS custom properties, or download the swatches as a PNG strip. Everything runs locally in your browser with the Canvas API — your image is never uploaded anywhere.

Frequently asked questions

How do I get a color palette from an image?

Drop your image on the tool and the dominant colors appear instantly as swatches with hex codes. Use the slider to choose between 2 and 12 colors, then click any swatch to copy its hex value, or copy the whole palette as CSS variables.

How does the generator pick the dominant colors?

It uses the median-cut algorithm: the image's pixels are grouped into boxes of similar colors and each box is averaged into one swatch. Swatches are ordered by how much of the image they cover, so the most dominant color always comes first.

Are my photos uploaded when I generate a palette?

No. The image is read with the Canvas API and every color calculation runs locally in your browser with JavaScript — your photo never leaves your device and nothing is stored on a server.

Report a bug