Color Extractor

Palette from any image

Loadingโ€ฆ

Was this tool helpful?

About this tool

This color palette extractor shrinks a photo down to 96 pixels wide, rounds each RGB channel down to 16 levels (4 bits) to group similar colors together, and shows the six most common colors, ranked by pixel count, as hex codes with their share of the image. For example, a photo with a large sky would likely put a sky blue tone in first place around 40%, with the remaining five slots filled by the colors of people or buildings in descending order. It is a fast way to pull reference colors for a logo or background straight out of a single photo, and a hex code can be copied with one click instead of reaching for an eyedropper tool. Fully transparent pixels are excluded from the count, so uploading a PNG with the background removed still gives percentages based only on the remaining subject.

How to use

  1. Drag in or select the photo you want to sample colors from.
  2. The image is automatically shrunk to 96px wide and the six dominant colors with their percentages are calculated.
  3. The original photo and the color list appear side by side.
  4. Click a swatch to copy its hex code to the clipboard; the label briefly changes to "Copied".
  5. Paste the copied code straight into a design tool or CSS.
  6. To try another photo, drag in a new image and the results update.

Frequently asked questions

How many colors does it extract?
The six most common colors, ranked by how many pixels match them. If a photo has fewer than six distinct colors, only that many appear.
What happens when I click a color?
Its hex code (#rrggbb) is copied to the clipboard, and the label briefly switches to Copied to confirm it worked.
How accurate is the color extraction?
For speed, the image is shrunk to 96px wide and each RGB channel is rounded down to 16 levels before grouping similar colors together, so this is not a precision color measurement tool; it is meant to quickly capture the overall color feel of a photo.
Is my photo sent to a server?
No. From the moment a photo is selected to analyzing its colors, everything runs in your browser.
How is the percentage calculated?
It is the pixel count of each color group divided by the total pixel count in the 96px wide image. Colors that do not make the top six are left out, so the six percentages shown may not add up to 100%.
What happens if I upload a PNG with a transparent background?
Fully transparent pixels are excluded from the count, so even a PNG with the background removed gets its percentages calculated only from the colors of the remaining subject.
What file formats can I upload?
Almost any image format the browser can display works: JPG, PNG, WebP, GIF, and more.
Does a high resolution photo slow it down?
No. The image is always shrunk to 96px wide before processing, regardless of the original resolution, so processing time barely depends on file size. Very subtle color differences can get grouped together in the process, though.
How do I compare colors across two photos?
Dragging in a new photo replaces the current results right away. To compare two photos, copy and note down the hex codes from the first photo before uploading the second one.

Similar tools