About this tool
A color palette from an image lists the main colors the picture is made of. Add a photo, logo or screenshot and the tool finds between 3 and 12 dominant colors, each shown with its HEX, RGB and HSL value and the share of the image that it covers.
The image is scaled down to at most 200 pixels on its longest side, then grouped with median-cut quantization. The method gives the same answer every time for the same image and settings, and mostly transparent pixels are ignored. The work happens in your browser, so the image stays on your device.
How to use the Color Palette
- 1Add a PNG, JPG, WebP, GIF, BMP or AVIF image.
- 2Use the slider to choose between 3 and 12 colors.
- 3Read each swatch for its HEX, RGB and HSL value and its share.
- 4Copy one value with the button beside it, or copy every HEX code at once.
- 5Copy CSS variables, or download the palette as a PNG strip or a JSON file.
Features
Dominant color extraction
Median-cut quantization groups similar pixels and reports the average color of each group.
Share of the image
Each swatch shows what percent of the visible pixels it represents, with the largest first.
Three formats per color
HEX, RGB and HSL values each have their own copy button.
Developer exports
Copy all HEX codes as a comma separated list, copy CSS custom properties, or download JSON.
A palette strip
Download palette.png, a strip of swatches labeled with their HEX codes.
Frequently asked questions
How are the colors chosen?
Median cut repeatedly splits the group of pixels along the color channel with the widest range, then averages each final group. The result reflects colors that appear in the image.
Why do I get fewer colors than I asked for?
An image with only a few distinct colors cannot be split further. A flat red and blue picture gives two colors even when you ask for twelve.
Why does a transparent PNG show fewer colors?
Pixels that are more than half transparent are ignored, so an empty background does not count. A fully transparent image has no visible colors.
Will the same image always give the same palette?
Yes. The method has no random step, so the same image and color count return the same colors in the same order.
Is the image uploaded for analysis?
No. The image is shrunk and read with your browser canvas, and the calculation runs on your device.