Palette Extractor
Pull the main colours out of any image. Sort them by how common they are, by lightness or by hue, then copy the hex codes or CSS variables.
About this tool
This finds the main colours in an image by grouping similar pixels together (k-means clustering) and taking the average of each group. Each swatch shows what share of the image it covers.
It is handy for building a colour scheme from a reference photo, matching a website to a piece of art, or picking materials that match a concept image.
How to use
- Drop, paste or pick an image.
- Choose how many colours to extract.
- Click a swatch to copy its hex, or copy them all as CSS.
- Download the palette as a PNG.
Everything happens on your device. Your files aren't uploaded anywhere.
Questions
Why do I get slightly different colours with the Variation slider?
Clustering starts from a random set of colours. Variation changes that starting point, which can shift the results a little, especially in images without clear colour groups.
How do I use the colours in CSS?
Click Copy CSS variables to get a :root block with --color-1 and so on, ready to paste into a stylesheet.
Can I get the colours in RGB instead of hex?
The tool gives hex codes, which almost every app accepts. Most design tools convert hex to RGB or HSL when you paste it in.