Extract dominant colours from an image
Every photo is made of a few colours that do most of the work. A sunset is mostly orange and purple. A forest photo is mostly green. This free tool finds those colours for you. Upload any image and it reads the pixels, groups them into colour clusters, and shows the five biggest colours with their share of the picture.
Designers use this to build a palette from a photo, to match a website to a brand image, or to pick a background colour that fits. You can also use it just to learn what a photo is really made of, which is often surprising. A photo that looks blue may be mostly grey.
How to use it
Press the file button and choose an image from your device. Any normal photo works: JPG, PNG, or WebP. The tool reads the image in your browser, shrinks it to a small working size, and samples every pixel. It groups close colours together, counts each group, and shows the top five.
Each result row has a colour swatch, a hex code, a bar, and a percent. The percent is the share of the picture that colour covers. Tap a hex code to copy it, then paste it into your design tool, your CSS, or your notes. Nothing is uploaded: your photo never leaves your device.
Worked example
Take a tiny test image made of nine pixels: five red pixels, three green pixels, and one blue pixel. The tool groups the reds into one cluster worth 56 percent, the greens into one cluster worth 33 percent, and the blue into one cluster worth 11 percent. The top colour is reported as #e00000, which is the quantised red, at 56 percent.
Try a real photo next. A beach photo might return a sandy beige at 34 percent, a sea blue at 28 percent, a sky blue at 18 percent, a white at 11 percent, and a dark brown at 9 percent. Those five colours are a ready-made palette for a poster, a slide, or a web page about that beach.
When this tool is useful
Use it when you design anything from a photo: a social post, a presentation, a website header, or a room colour scheme. The dominant colours are the safe choices, because they already appear in the image and they already work together. Pick the top colour for backgrounds and the second colour for accents.
Photographers use it to check white balance and colour casts. If the top colour of a snow photo is blue instead of white, the photo has a cold cast. Artists use it to plan a painting palette before they open a tube of paint.
Honest limitations
The tool groups colours into buckets of 32 steps per channel, so close shades merge into one cluster. That keeps the result readable, but it means the hex code is an approximation of the cluster centre, not the exact shade of any single pixel. Two photos with the same top colour can still look different.
Very large photos are shrunk to 100 pixels on the longest side before sampling, which is fast but loses fine detail. A thin red line in a big photo may vanish from the top five. The tool shows the big shapes of colour, not every small detail.
Frequently asked questions
Is my photo uploaded anywhere? No. The tool uses the FileReader and canvas features of your browser. The image is read on your device and never sent to a server.
Why five colours and not more? Five is enough to describe most photos and short enough to use as a palette. More colours would add tiny slices that do not help a design.
What does the percent mean? It is the share of sampled pixels in that colour cluster. If the top colour is 40 percent, about 40 percent of the picture is that colour family.
Can I use the hex codes in CSS? Yes. Tap a hex code to copy it, then paste it straight into a stylesheet, a design tool, or a slide. The codes are standard six digit hex values.
También disponible en español: Extraer Colores Dominantes de una Imagen – Los 5 Principales, Gratis
