What Is a Dominant Color Extractor?
A dominant color extractor works out which colour covers the largest part of an image. Instead of picking a single pixel, it analyses the whole picture, groups thousands of similar shades into a few representative colours, and ranks them by how much of the image they cover. The top result is the dominant colour, the one your eye perceives as the image's main colour.
Dominant colours are widely used in design and development. Music and video apps tint their backgrounds to match album art, online stores classify products by colour, photographers check the colour balance of a series, and web developers use a dominant colour as a placeholder while images load. This free tool gives you that colour instantly, with HEX, RGB and HSL codes, and it never uploads your image.
How to Find the Dominant Colour of an Image
- Upload an image by dropping it into the box or browsing for it.
- Read the dominant colour at the top, shown with its percentage of the image.
- Adjust the number of colour groups for broader or finer analysis.
- Tick "Ignore white and black backgrounds" for product photos and logos on plain backgrounds.
- Copy any colour code or the ready-made CSS variables.
Dominant Colour vs Average Colour
These two are often confused, but they can be very different:
- The average colour mixes every pixel together. A photo that is half red and half blue averages to purple, a colour that may not appear anywhere in the image.
- The dominant colour is the largest group of similar pixels, so it is always a colour that really appears in the image. In the same photo, it would be red or blue.
This tool shows both. Use the dominant colour for accents and themes, and the average colour for soft, neutral backgrounds and loading placeholders.
How the Extraction Works
The image is scaled down to a sample of around 40,000 pixels, which keeps the analysis fast without changing the colour proportions. The tool then runs k-means clustering. It places a number of colour centres spread across the image's colours, assigns every pixel to its nearest centre, moves each centre to the average of its pixels, and repeats until the groups settle. Transparent pixels are ignored, and results are deterministic, so the same image always gives the same answer.
Features
- Accurate clusteringK-means++ grouping finds real, representative colours.
- PercentagesSee exactly how much of the image each main colour covers.
- Background filterIgnore white or black backgrounds to find a product's or logo's true colour.
- Average colourGet the overall mixed colour for placeholders and gradients.
- Colour namesEach result is labelled with the closest common colour name.
- CSS outputCopy ready-to-use CSS custom properties with a readable text colour.
Practical Uses for Dominant Colours
- Image placeholders: show the dominant or average colour while a large photo loads, for a smoother page.
- Adaptive design: tint cards, headers or music players to match album art, product photos or thumbnails.
- Product tagging: automatically label clothing, cars or furniture by their main colour for filters and search.
- Brand checks: confirm that campaign images match your brand colour.
- Photo curation: sort a gallery by colour to create visually pleasing grids and mood boards.
For a broader set of colours to design with, use the Color Palette Generator, which exports the colours as CSS, SCSS, JSON or a palette image.
Tip: for product photography, crop tightly around the item first. The less background in the frame, the more accurately the dominant colour reflects the product itself rather than the studio backdrop or tabletop.
Frequently Asked Questions
What's the difference between this and the palette generator?
This tool focuses on the single main colour and each colour's share of the image. The palette generator focuses on building an exportable colour scheme.
How do I find the main colour of a photo?
Upload the photo. The large swatch at the top shows the dominant colour and its HEX code, ready to copy.
Why is the dominant colour white or grey?
Backgrounds often cover most of an image. Tick "Ignore white and black backgrounds" to focus on the subject.
How many colour groups should I use?
Six works well for most images. Use fewer for broad colour families, and more to separate similar shades.
Does it work with transparent PNGs?
Yes. Transparent pixels are skipped, so only visible colours are counted.
Is my image uploaded?
No. The analysis runs entirely in your browser.