Color palette from image

Pull the main colors out of any picture. Choose how many colors you want, then copy or export them.

or drop one here, or paste with Ctrl+V or ⌘V. Up to 20 MB, and it never leaves your device.
Each circle is one palette color. Drag a circle to change that color.

How to use it

  1. Choose an image, drop it on the box, or paste it with Ctrl+V or ⌘V. A sample image is loaded to start.
  2. Pick how many colors you want, from 3 to 8.
  3. Each circle on the image marks one palette color. Drag a circle, or focus it and use the arrow keys, to take that color from another spot.
  4. Click a hex code to copy it, or export the palette as CSS variables, Tailwind or JSON.

How it works

The tool samples the image's pixels and groups similar ones using k-means clustering in OKLab, a color space where distance matches how different colors look. Each group's average becomes a palette color, and the percentage shows how much of the image it covers.

Groups that come out nearly identical are merged, so a simple image may give fewer colors than you asked for.

Everything runs in your browser. Your image isn't uploaded.

Questions

Is my image uploaded?

No. The palette is calculated in your browser, and the image never leaves your device.

Why did I get fewer colors than I chose?

If two colors in the result would look almost the same, they're merged into one. Simple images with few colors give shorter palettes.

Will the same image always give the same palette?

Yes. The method is deterministic, so the same image and color count always produce the same result.