Palette from image
Extract a color palette from an image: drop in a photo and get its 3 to 16 main colors, sorted by how much of the picture each one covers. The colors are found with the method Google uses for Material You. Copy them as a HEX list or CSS variables. Free and online, nothing is uploaded.
How to get a color palette from a photo
- 1Drop a picture in, or click to choose it
- 2Choose the "Number of colors", 6 is preset
- 3Copy one HEX code, or the whole palette as a list or CSS variables
- The picture's main colors, largest share first
What happens to your picture
- Nothing is uploaded.Your picture is opened and read by your browser, on your own device
- Google's color method.The Celebi quantizer behind Material You: Wu's method first, then k-means in Lab
- Shares you can see.A bar and a percentage show how much of the picture each color covers
What you can do
- Find the 3, 4, 5, 6, 8, 10, 12 or 16 main colors of a photo, illustration, logo or screenshot
- See each color as a swatch with its HEX code, its share of the picture and a copy button
- Copy the palette with "Copy as HEX list", one color per line, or with "Copy as CSS variables" as --color-1, --color-2 and so on
- Change the number of colors and get the new palette at once, without opening the picture again
- Leave see-through parts out: pixels that are more than half transparent don't count
Good to know
- The colors are found on a copy of the picture at most 256 pixels on its long side. That is plenty for the main colors, but a tiny detail can drop out
- Each color stands for a group of similar pixels, so it may not match any single pixel exactly. For one exact pixel, use the Color picker from image
- A picture with only a few different colors can give fewer colors than you asked for
- PNG, JPG, WebP, GIF, BMP and AVIF up to 50 MB and 100 million pixels
Questions
How do I extract the main colors from an image?
Drop the image into the tool. It shows six main colors right away. Choose another number under "Number of colors" for more or fewer.
What does the percentage under each color mean?
It is how much of the picture that color covers. The palette is sorted by it, so the color of the largest area comes first.
Is my photo uploaded to a server?
No. The photo is decoded by your browser and read from a canvas on your device. No request is made with it.
How are the colors chosen?
With the Celebi quantizer from Google's material-color-utilities, the code behind Material You. Wu's method finds starting colors, then k-means in Lab color refines them.
Can I use the palette in Photoshop or GIMP?
Yes. Click "Copy as HEX list" and paste the list into the tool Color palette to ASE/GPL. It saves an .ase file for Adobe programs or a .gpl file for GIMP, Inkscape and Krita.
More tools in Web & code
That page doesn't exist. Search or drop a file below to find the tool you need.
One site for every file job. What’s yours?
Stop hopping between converter sites. Pick from 410+ tools, or a recipe that chains several.
- Files Stay On Your Device
- No watermark
- Works offline
Drop a file here
A pasted file works too.
or search for a tool
Open an app
From “ugh, this file” to done, in three steps.
- Drop it, or pick a task
No file? Search for what you need. Files are processed on your device, not uploaded for processing.
- Pick what you want
Smaller, another format, signed, merged. One click, no settings to study first.
- Make it a recipe
Need three steps in a row every week? Chain them once and run the same recipe next time.
One approved toolbox for the whole team.
In offices, on building sites and in agencies, teams handle sensitive files all day. ToolRecipe gives everyone the same tools and the same recipes, and the files are processed on each person's own computer.
- Files are processed on the employee's device
- Company recipes everyone runs the same way
- One place instead of ten converter sites