Color Palette Extractor — Get Dominant Colors from Any Image
Free online color palette extractor: find the dominant colors in any photo with k-means clustering, copy hex codes or download the palette as PNG — 100% in your browser, images never uploaded.
About Color Palette Extractor
Drop a photo and this tool finds its dominant colors — a ready-made palette you can copy into design tools, CSS, or slide decks. Colors are detected with k-means clustering on a downscaled copy of the image, so even large photos are analyzed instantly, and the same picture always yields the same palette. Everything runs locally in your browser; your images are never uploaded.
How to use Color Palette Extractor
- Drop, browse, or paste (Ctrl+V) the image you want to analyze.
- Pick how many colors to extract (3–10, default 6) — the palette updates automatically.
- Click a swatch to copy its hex code, or copy / download the whole palette.
How the palette extractor works
From photo to palette
Your image is first shrunk so its longest side is at most 120 pixels — large enough for the color statistics to be representative, small enough to analyze instantly. Fully transparent pixels are ignored, so an alpha channel cannot skew the result toward black.
The remaining pixels are grouped with k-means clustering in RGB space: each swatch is the average color of one group, and the percentage shows how large that group is. The clustering is seeded deterministically from evenly spaced samples, so the same image always produces the same palette.
Using the result
Click any swatch to copy its hex code, copy the whole palette as a JSON array, or download it as a PNG strip. The palette is a practical starting point for UI themes, artwork, or presentations — though k-means in RGB space is a statistical rather than perceptual measure, so very similar shades can occasionally land in separate swatches.
Frequently asked questions
Is this tool really free?
Yes — free with no account, watermark, or limits.
Are my images uploaded anywhere?
No. The analysis happens on a downscaled copy of your image inside your browser. The page even keeps working once you go offline.
How are the dominant colors chosen?
The image is shrunk to at most 120 pixels per side and its pixels are grouped with k-means clustering in RGB space. Each swatch shows the average color of one group and its share of all pixels.
Why don't transparent areas appear in the palette?
Fully transparent pixels are skipped before clustering, so a PNG's alpha channel does not distort the colors.
Which image formats are supported?
Any format your browser can open: PNG, JPEG, WebP, GIF (first frame), AVIF, and more.
Related tools
Age Calculator
Calculate exact age in years, months, and days, plus total days/weeks/hours lived and a next-birthday countdown.
runs locallyBase64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly in your browser.
WebAssemblyCLI / agentCase Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and kebab-case.
WebAssemblyCLI / agentColor Converter
Convert colors between HEX, RGB, and HSL formats instantly.
WebAssemblyCLI / agentCron Parser / Schedule Explainer
Translate any 5-field cron expression into plain English and see the next 10 run times — computed locally in your timezone.
runs locallyCSS Formatter
Beautify (pretty-print) minified or messy CSS instantly, right in your browser.
runs locally