Color Palette from Image
Pull the 5 main colors out of any image.
Drag an image here, or click to choose
JPG, PNG, WebP. Extracted in your browser.
About
Drop in an image and pull out the 5 dominant colors using k-means clustering. Click any color to copy its hex code. Export as CSS variables. Useful for design moodboards, web themes, and matching colors to a reference photo.
How to use
- Drag an image into the dropzone (or click to choose).
- Five dominant colors are extracted automatically.
- Click any swatch to copy its hex code, or click Export CSS to download a snippet.
FAQ
How are the colors picked?+
It uses the colorthief library, which clusters the image's pixels into the most distinct color groups (a variant of k-means). The output is the 5 most representative colors, not necessarily the most frequent.
Does my image leave my browser?+
No. Extraction happens locally. The image is never uploaded.
Why does my palette look slightly different each time?+
Color clustering involves a small amount of randomness in the initial groupings. The result is stable in practice but can vary by 1 or 2 hex points between runs.