Studio › Image › Extract Color Palette
Gives you the dominant colors in an image as a palette.
This tool runs on JavaScript. To use it, turn on JavaScript in your browser and reload the page.
Extract Color Palette finds the dominant colors of a photo or design and returns them as a palette. You choose the number of colors between 2 and 16; the default is 8. Each color is shown with its HEX code, RGB value and the percentage of the image it covers, sorted from most to least used. It is used to pull brand colors from a logo, pick presentation colors that match a photo, or see the color balance of a design.
The method is color quantization: the image is first reduced to a copy of at most 200 pixels and to 48 candidate colors; near-identical shades are merged, then the number of colors you chose is picked to represent the image best, and the pixels covered by each color are counted. This way a small but distinct color (an accent in a logo, a red object in a photo) doesn’t drop out of the palette, and shades of the same color don’t fill it; if the image has fewer distinct colors than you asked for, the palette comes out shorter. The reduction doesn’t change the result; it only speeds things up. Transparent pixels are left out of the count, so the palette of a logo with a transparent background isn’t mistakenly filled with black. The report can be downloaded as JSON. To get the color of a single pixel, use “Image Color Picker”; to derive matching colors from a main color, use “Color Palette Generator”.
The method was changed after a measurement. On a 1200 × 800 pixel test image (blue background, yellow stripes and a red circle covering 7.5% of the image), the old method filled four of the eight palette colors with nearly identical blues (#285a9f, #285b9f, #285aa0, #285a9e) and mixed the red with the blue to give purple (#853b65); red did not appear at all between 3 and 8 colors. Now candidates closer than an RGB distance of 28 are merged into one color, and colors are chosen one at a time: at each step, the candidate that most reduces the image’s total color error is added. On the same image, red was found at 3, 5 and 8 colors with a deviation of 1 unit and yellow with 5 units; no near-duplicates appeared. Another quantization method that was tried (fast octree) was flawless on graphics but raised the error 1.5–2.3 times on photos, so it was not chosen. The transparency threshold is 16: pixels with an alpha value below 16 are not counted. Without this rule, a logo whose background was 57% empty showed a palette that was 54.5% black.
If the image doesn’t contain that many distinct colors, as with a two-color logo, the palette comes back with fewer colors.
How much of the visible pixels each color covers. If sky blue comes out at 40% in a photo, about 40% of the image is close to that shade.
The palette merges similar shades into one average color, so a color’s HEX code may not match any single pixel exactly. For an exact pixel color, use “Image Color Picker”.
No. Your file reaches the server only to be processed and is deleted when the job is done; the output is deleted too once you download it and leave the tool. You don't need an account, a name or an email address, and your files are never sent to a third-party service. It is free to use: we set no hourly or daily quota on the number of jobs, we don't make you watch an ad before processing, and we add no watermark to the output.
About us · Contact · Privacy & KVKK · Cookie Policy · Terms of use