Skip to content
Color Tools

Color Palette from Image

Upload, paste or link any photo and get its dominant colors as a ready-to-use palette — with free unlimited export to CSS variables, SCSS, Tailwind, JSON or a PNG swatch sheet. Your image never leaves your browser.

Drop an image here

or paste it with Ctrl+V

What “dominant colors” really means

Ask five tools for an image’s palette and you will get five answers, because “the” palette doesn’t exist — it has to be computed, and the method matters. This extractor first collapses the photo into a compact color histogram, then clusters those colors with a k-means algorithm running in OKLab, a perceptually uniform color space. Clustering where distances match human perception is the key trick: it keeps a sunset’s orange and its pink as two swatches instead of averaging them into a muddy salmon, and it refuses to waste two palette slots on shades your eye can’t tell apart.

Each swatch also reports its coverage share — how much of the image belongs to that cluster. That’s often more useful than the color itself: the 55% swatch is your background candidate, the 3% accent is what makes the photo pop.

Getting a palette worth using

  • Crop before extracting. If you want the palette of the dress, not the street behind it, crop the photo first — the extractor weighs every pixel.
  • Match the count to the subject. Minimal interiors and posters sing with 4–6 colors; busy landscapes may honestly need 12.
  • Beware of white balance. A photo shot under warm bulbs bakes orange into every swatch. Correct the photo first if you need “true” object colors.
  • Deduplicate visually. If two swatches look identical, extract fewer colors — the difference between them is real numerically but useless practically.

From photo to design system

The export buttons emit formats you can drop straight into a project: CSS custom properties for plain sites, SCSS variables for legacy pipelines, a Tailwind theme.extend.colors fragment, machine-readable JSON, or a PNG swatch sheet for mood boards and client decks. All exports are free and unlimited — no account, no watermark, no “pro” gate. Individual swatches can also go into My colors, the tray shared by every tool on this site, so you can immediately test a candidate pair in the contrast checker or put two extracted shades side by side in the compare tool.

A note on privacy

Palette extraction is exactly the kind of feature that usually means “upload your image to our server”. Here it doesn’t: the histogram and the clustering run in a background thread of your own browser, and the photo never leaves your device. Unreleased product shots, client work under NDA, family photos — all safe by construction, not by promise.

When you need a single pixel instead

A palette summarizes; sometimes you need the exact color of one specific spot. For that, use the color picker from image on the home page — it magnifies to pixel level and reads the precise value under a loupe, with the same privacy guarantees.

Frequently asked questions

How does the palette extraction work?

The image is sampled into a color histogram, then clustered with k-means in the perceptual OKLab color space, weighted by how many pixels each color covers. The result is the set of colors that visually dominate the image, not just the most frequent exact pixel values.

Is my photo uploaded to extract the palette?

No. The whole analysis runs in a background thread of your own browser. The image never leaves your device.

Why do I get slightly different colors than another palette tool?

There is no single “correct” palette — tools differ in sampling, color space and clustering. This one clusters in OKLab, which groups colors the way human vision does, and it is deterministic: the same image always produces the same palette here.

What do the percentages mean?

The share of the analyzed pixels that belong to each color’s cluster — effectively how much of the image area that color covers.

Can I export the palette for my project?

Yes, free and unlimited: copy CSS custom properties, SCSS variables or a Tailwind config fragment, or download the palette as JSON or as a PNG swatch sheet.

How many colors should I extract?

Start with 8. Posters and interiors often work with 4–6; detailed photos with many distinct regions can justify 12. If two swatches look almost identical, lower the count.