How to use Dominant Colors
- Choose an image (a photo, logo, screenshot or artwork).
- Set Colours from 2 to 12 (the default is 6).
- Press Extract colours.
- Read the swatches with their percentages. Below them, the Palette table lists HEX, RGB and share and can be saved as palette.csv; the CSS variables block can be saved as palette.css.
What it does and when to use it
A palette tells you what a picture is “made of”. Designers use it to build a website or slide theme that matches a hero photo, to check a product shot against brand colours, to choose text and button colours for a poster, or to describe a logo’s colours to a printer. Because each colour comes with its share, you also see which one dominates and which are accents.
To read one exact pixel instead, use the Color Picker. To test whether text will be readable on a palette colour, use the Color Contrast checker. For fresh colour ideas that are not tied to a picture, try the Random Palette Generator.
How it works
Everything runs in a Web Worker on your device:
- The picture is scaled so its longer side is at most 400 px, which keeps the work fast and does not change the colour proportions much.
- Up to 60,000 pixels are sampled evenly; pixels less than half opaque are skipped.
- A median-cut method splits the colours into groups. Each round it finds the group with the widest spread in red, green or blue and cuts it in the middle of that range.
- Each group’s colours are averaged, and the groups are sorted by size.
Worked examples
We built a 400 × 300 px test image and ran the tool’s own median-cut function: the top 30 rows orange #f97316, the right quarter white, the rest blue #2563eb.
| Colours setting | Result |
|---|---|
| 3 | #2563eb 67.5%, #ffffff 22.5%, #f97316 10% |
| 6 | the same three colours (there are only three) |
| 2 | #5c8af0 90%, #f97316 10% |
With 2 colours, blue and white fall into one group and average to a light blue, #5c8af0, which does not appear in the picture. That is why a few extra colours usually give a more faithful palette.
Using the output. For the 3-colour result, the CSS block reads --color-1: #2563eb;, --color-2: #ffffff; and --color-3: #f97316; inside :root, ready to paste into a stylesheet.
Limits and tips
- Photos have thousands of shades, so the palette is a summary, not a complete list.
- Tiny accents, like a small red logo on a big photo, may merge into a larger group; crop to the area you care about with the Image Cropper.
- There is no randomness: the same file and setting always give the same palette.
Frequently asked questions
Why did I get fewer colours than I asked for?
Why is a swatch a colour I cannot find in the picture?
Are transparent areas counted?
What do the percentages mean?
How do I use the palette in CSS?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.