Color Palette from Image
Extract a clean 5-color palette from any image.
Drag an image here, or click to choose
JPG, PNG, WebP — extracted in your browser
About this tool
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 for your next project. Useful for design moodboards, web themes, and matching colors to a reference photo.
How to use it
- 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?+
We use 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 how the initial groupings are picked. The result is stable in practice but can vary by 1–2 hex points between runs.