Image Color Palette Extractor
Choose an image to extract its dominant colours — 3 to 12 swatches with HEX, RGB and HSL values and how much of the image each covers. Copy single values, a HEX list, CSS variables or JSON. The image is analysed in your browser and never uploaded.
Your files never leave your device.
How to use the Image Color Palette Extractor
- 1Choose or drop an image: a photo, logo, illustration or screenshot.
- 2Pick how many colours you want, from 3 to 12.
- 3Copy any HEX, RGB or HSL value, or the whole palette as a HEX list, CSS variables or JSON.
What is the Image Color Palette Extractor?
The extractor reduces the image to at most 400 pixels on its longest side — plenty for colour statistics — and samples the pixels, skipping transparent ones. It then groups similar colours with k-means clustering: it starts from well-spread colours (k-means++), assigns every pixel to the nearest one, moves each to the average of its group and repeats until the groups settle. Each swatch is the average colour of a group, sorted by how much of the image it covers.
Because swatches are averages, a photo with smooth gradients gives slightly muted colours, and a small but striking accent can be absorbed into a larger group — increase the number of colours to separate it. Results are deterministic: the same image and settings always give the same palette.
In-depth guide
How to Extract a Color Palette From a Photo or Logo →Frequently asked questions
Is my image uploaded?
No. The image is decoded and analysed in your browser with the Canvas API; it never leaves your device.
Why doesn’t the palette include a colour I can see?
Small areas are merged into the nearest large group. Choose more colours, or use the Image Color Picker to read that exact pixel.
What do the percentages mean?
Roughly how much of the image each colour covers, based on the sampled pixels. Transparent areas aren’t counted.
Is the Image Color Palette Extractor free and private?
Yes. The Image Color Palette Extractor is free, needs no account, and processes your files entirely in your browser. Files are never uploaded to a server or stored.
Related tools
All color tools →- Image Color PickerClick any pixel of an image to get its colour.
- Color Palette GeneratorGenerate harmonious color palettes.
- Color PickerPick colors and get HEX, RGB and HSL codes.
- Contrast CheckerCheck WCAG color contrast for accessibility.
- Color ConverterConvert any color between HEX, RGB, HSL, HSV and CMYK.
- HEX to RGBConvert HEX color codes to RGB.
