How to use Image Palette Extractor
- Choose one JPEG, PNG or WebP picture.
- Set how many colors to report, from 2 to 10.
- Leave the area on Whole image, or switch to Center half to ignore a border or a watermark.
- Select Read the palette. Copy the values, or download the JSON, CSS variables or PNG strip.
Example: Image Palette Extractor
Read the main colors from a photograph.
Options
- Colors to report
- The number of groups the tool may return, from 2 to 10, largest share first. A small number merges similar shades into one entry, so a photo that looks like six colors can come back as four.
- Area to read
- Whole image reads everything. Center half reads the middle 50 percent of both sides, which leaves out a border, a frame or a watermark in a corner.
- Ignore see-through pixels
- On by default, so pixels less than half opaque are skipped and a cut-out logo is judged by its visible shape rather than its invisible color. Turn it off to include them.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
How the colors are grouped
The tool uses median cut. Every sampled pixel starts in one group, and the group with the most pixels is repeatedly split along its widest color channel until the requested number of groups is reached or no group can be split further. Each group is then replaced by the average of the pixels inside it and sorted by how many pixels it holds. Groups whose averages are very close are merged, which is why two similar shades often arrive as one entry.
Why the palette comes from a scaled copy
Reading every pixel of a 40 megapixel photo would need a large buffer and a long wait on a phone. The picture is first drawn onto a copy no larger than 1000 pixels on its longest side, which keeps the work bounded and still samples the whole frame evenly. A thin line or a small object can lose its weight in that copy, which is why the share percentages describe the sampled picture rather than the original file.
Questions about Image Palette Extractor
Are these the exact colors in my file?
No. Each entry is the average of a group of similar pixels, taken from a scaled copy of the picture. It is close enough to build a scheme from, but for a value you must match exactly, read that pixel with the color picker page.
Why did I get fewer colors than I asked for?
There were not that many distinct groups to find. The tool stops splitting when every group is a single flat color, and the result says how many groups it returned.
How do I ignore a white border or a logo?
Switch the area to Center half, which reads the middle 50 percent of each side, or crop the border away first. Both leave the edge color out of the grouping.
Which number should I choose?
Around 5 or 6 gives a workable scheme for most photos. Two or three shows only the dominant notes, while nine or ten starts separating shades that look almost identical on screen.
What do the palette downloads contain?
JSON includes hex, RGB, HSL and sampled share values. CSS defines numbered color variables in :root. The PNG strip uses the same color order with equal-width swatches. These are representative grouped colors, not a list of every original pixel.