Colour palette generator — extract colours from any image
Pull a palette out of any image, three different ways, with HEX, RGB and HSL for every colour and a contrast check between any two. The picture is read in the page and never uploaded.
Runs in your browser — your input is not uploaded to ToolsNow.
Your files are processed locally in your browser and are not uploaded to ToolsNow.
Extracted values are what is in this file, not a brand’s specified colours. JPEG compression shifts colour, screenshots and photographs add lighting and display characteristics, and an embedded colour profile can change how the same bytes are meant to be displayed. Treat the result as a close reading of the image, and check against an official brand reference if one exists. Colours are read from a sampled subset of pixels rather than every one — the palette is indistinguishable and the tool stays responsive on large photographs — so the percentages are close estimates rather than exact counts. Fully transparent pixels are excluded entirely, which is why a logo on a transparent background gives the logo's colours and not black. Images up to 50 megapixels (about 8000 × 6000). Larger files are refused rather than risking the tab being closed by the browser.
How to use
- Add an image. Drop, choose or paste. Screenshots of a design work as well as photographs.
- Choose how many colours. Between two and sixteen. Six is a good starting point for a theme.
- Pick an extraction method. Dominant counts pixels, balanced covers the range of colours present, and most-saturated ignores greys to find the accents.
- Lock what you like. Lock the colours worth keeping, then regenerate to get different options for the remaining slots.
- Check contrast. Pick any two palette colours to see the WCAG ratio and whether that pairing passes at each text size.
- Export. Copy a single hex, or download TXT, JSON, CSS custom properties, a Tailwind config block, a PNG swatch sheet, or a hex list for the pixel art and dither tools.
Questions
Are these the brand’s exact colours?
No, and no tool that reads pixels can promise that. JPEG compression shifts colour, screenshots pick up whatever the display and any colour profile did to it, and a photograph adds lighting on top. What you get is an accurate reading of this file. If an official brand reference exists, check against it.
Why do the three methods give such different answers?
Because they answer different questions. Dominant counts pixels, so on a portrait against a wall it mostly returns wall. Balanced subdivides the colour space, so it will not spend four slots on four near-identical shades. Most-saturated filters out greys and near-neutrals first, which is usually what you want when building a theme and almost never what a pixel count returns.
Why does a different tool give a different palette from the same image?
Because there is no single correct answer. Tools differ in their clustering algorithm, in whether they compare colours in RGB or a perceptual space, in how many pixels they sample, and in whether they exclude transparency. Those are all legitimate choices that lead to different results. The method used here is stated on each option so you know which question you asked.
What do the percentages mean?
The share of sampled pixels assigned to that colour. Large images are sampled rather than counted pixel by pixel — the palette is indistinguishable and the page stays responsive — so treat them as close estimates rather than exact counts.
How is the contrast ratio calculated?
By the WCAG 2 formula, from the relative luminance of both colours. AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1 and 4.5:1. The result is written out in words as well as shown as a number, so it never depends on you being able to see the swatch.
What happens to transparent areas?
They are excluded entirely. Including them would drag the palette toward whatever the transparent pixels happen to store, which in most exported PNGs is pure black — which is why a logo on a transparent background gives you the logo’s colours here rather than a black entry.