All tools

Color Palette from Image

Pull the 5 main colors out of any image.

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

  1. Drag an image into the dropzone (or click to choose).
  2. Five dominant colors are extracted automatically.
  3. 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.