Color Palette From Image

Drop a photo or paste a screenshot. Get its main colors as hex, CSS variables, Tailwind, JSON, an .ase swatch file or a PNG. The picture stays in this tab.

No upload, no account

Drop a picture here, or press Ctrl+V (Cmd+V on a Mac) to paste a screenshot

Drop a picture, choose a file, or paste a screenshot.

Drop a photo, get the colors

Pulling the colors out of a photo should be quick. The usual pages want the file uploaded before they show anything, and the best-known palette app puts the export behind a subscription. My research notes also said none of them took a paste, which is how a lot of screenshots travel.

Here you can drop a picture or pick a file, and Ctrl+V works too (Cmd+V on a Mac). The picture gets read right in this tab. Pick how many colors you want, from 2 to 12. Copy one hex, or copy the whole set as CSS variables, Tailwind or JSON.

How the colors are picked

First the picture is shrunk so its long side is 160 pixels. A 4:3 photo becomes 160 by 120, which is 19,200 pixels. That's plenty for a palette. Pixels that are mostly see-through get skipped.

The rest are grouped by how close they look, in a color space called OKLab, where a step in any direction is about the same step to the eye. Each group becomes one swatch. The percent next to it is how much of the picture that group covers, and the biggest comes first.

The grouping starts from the same place every time, so the same picture gives the same palette. Ask for 12 from a logo that has three colors and you get three. The page says so instead of inventing nine shades.

Where the colors go next

CSS variables land on :root as --palette-1, --palette-2 and so on. Tailwind v4 gets an @theme block with --color-palette-1, so bg-palette-1 works in your markup. Tailwind v3 gets a config file with the same names. JSON carries the hex, the RGB numbers and the percent.

The PNG is a 1200 by 630 sheet with one stripe per color and its hex printed on it. The .ase file is Adobe Swatch Exchange, the swatch format the Adobe design apps import.

Why I built this one

I ranked this idea nineteenth out of 1,754 in the queue, score 9.25. A Reddit post about a site that pulls a palette out of a picture got 8,723 upvotes on r/InternetIsBeautiful. So the idea is old and people like it. Most of the pages that do it still send your picture to a server for work the browser can do right here.

What this page will not do

It won't upload the picture. Mixpanel and Google Analytics load with Softery.io. They see that someone opened the tool, and roughly how big the file and the palette were. They don't get the picture or its colors.

It won't match your colors to a paint or print color system. Each hex is just the average of the pixels in its group. To check two of the colors against WCAG, use the contrast checker. To turn a hex into oklch or hsl, use the color format converter. I wrote the longer story in Half the Picture Was Sky.

Common questions

Does my picture leave this tab?

No. The file is decoded and counted in JavaScript here, and nothing is uploaded. Mixpanel and Google Analytics load with Softery.io. They see a size band and roughly how many colors came back, never the picture or its colors.

Can I paste a screenshot?

Yes. Copy the screenshot to the clipboard, click anywhere on this page and press Ctrl+V, or Cmd+V on a Mac. PNG, JPEG, WebP, GIF and iPhone HEIC files work with drop and Choose a picture too. The limit is 40 MB.

Why did I get fewer colors than I asked for?

The picture doesn't have that many different colors. A flat logo with three colors gives three. The page won't invent shades to fill the count.

Why is the hex a little off from my brand color?

Each swatch is the average of a group of similar pixels. JPEG noise and shading pull that average a few steps. If you need one exact value, take it from the source file.

Looking for something else?

AI suggestions may send your search terms to OpenAI or Anthropic.