Candid Tools

Palette Extractor

Palette Extractor finds an image's main colors with k-means clustering in OKLab on a canvas in your browser, so the image is never uploaded.

Choose an image, drop it here, or paste it (Ctrl+V)

Image file. Stays on your device, never uploaded.

At a glance

Accepts
PNG, JPG, WebP, GIF and other images your browser decodes
Outputs
3 to 16 colors with HEX, RGB and HSL codes, exportable as CSS, SCSS, Tailwind, JSON or a PNG
Where it runs
Entirely in your browser, on your device
What leaves your device
Nothing - the file never leaves your device
Limits
No size or count cap; bounded by your device's memory
Account
Not required - there is no sign-up
Price
Free, with no watermark and no usage cap
Made by
Visrut
Last updated
19 November 2026

Pull the main colors out of any photo, screenshot, logo or artwork. Pick how many colors you want, from 3 to 16, and copy each one as HEX, RGB or HSL, or the whole palette as CSS variables, SCSS, Tailwind or JSON. Hover over a color to see where it appears in the image. Everything runs in your browser, so the image never leaves this tab.

How to use it

  1. Choose an image, drop it here, or paste it (Ctrl+V).
  2. Set how many colors you want. Ten is the default.
  3. Click a color to copy its HEX, RGB or HSL code.
  4. Pick an export format and press Copy all, or download the palette as a PNG.

How it works

The image is shrunk to a working copy, then every pixel is converted to OKLab, a color space where distance matches how different two colors look. K-means clustering groups the pixels into the number of colors you chose, and shades too close to tell apart are merged. No AI model is downloaded.

Frequently asked questions

Is my image uploaded?

No. The image is read on a canvas in your browser and the palette is worked out there. Nothing is sent to a server.

How are the colors picked?

The tool groups every pixel by how similar the colors look to the eye (k-means clustering in the OKLab color space), then shows the average color of each group. The percentage is how much of the image each color covers.

Why did I get fewer colors than I asked for?

Shades too close to tell apart are merged into one. A two-color logo gives two colors rather than ten near-identical shades.

Will the same image always give the same palette?

Yes. The clustering uses a fixed starting point, so the same image and the same number of colors always give the same result.

Can I use the palette in my code?

Yes. Copy every color at once as HEX codes, CSS variables, SCSS variables, a Tailwind colors block or JSON, or download the palette as a PNG.