About Color Palette Extractor
A palette pulled from a real photo, illustration or brand asset is often more useful than a generic preset: it carries the actual light, shadow and accent colours of the image. This tool samples the picture, groups similar pixels with median cut and returns a compact set of dominant colours instead of thousands of near-duplicates.
Each swatch reports HEX, RGB and the share of sampled pixels it represents, so you can tell a background colour from a small accent. Copy individual values, or take the whole palette as CSS custom properties or JSON for a design system. Sampling and quantisation run in the browser tab, and the image is never uploaded.
What this tool does
Median-cut palette
Samples the image and splits colour space along the widest channel repeatedly, which keeps the palette representative of the actual image.
5 to 8 colours
Choose how many palette entries you need; the same image yields a compact five-colour set or a wider eight-colour exploration.
Share of pixels
Every swatch shows the percentage of sampled pixels it covers, so dominant backgrounds are distinguishable from accents.
Copy-ready values
Copy each HEX or RGB value with one click, or take the whole palette as CSS variables or JSON.
Transparency-aware sampling
Near-transparent pixels are ignored so cut-out PNGs do not produce colour from invisible areas.
Local processing
The image is decoded and sampled with the Canvas API in the browser; it is never uploaded.
How to use Color Palette Extractor
- 01
Add an image
Drop a JPG, PNG or WebP file up to 25 MB; the palette is extracted immediately.
- 02
Choose the colour count
Start with six colours, then move to five for a compact palette or eight for more variety.
- 03
Review the swatches
Check HEX, RGB and the share of each colour; large shares usually indicate background or base colours.
- 04
Copy what you need
Copy an individual colour, or take the CSS variables or JSON block for your design tool.
- 05
Test the palette
Check contrast and legibility for text and UI use; extracted colours are a starting point, not a finished accessible palette.
How this tool works
- Works with
- Image → Colour palette
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Maximum size
- 25 MB per file
- Requirements
- Chrome, Edge, Firefox or Safari on desktop or mobile · No installation or account; sampling and quantisation run on your device
Limitations worth knowing
- Median cut is an approximation: buckets are averaged, so a specific brand colour may come out shifted.
- The share percentages come from a downscaled sample, not an exact full-resolution pixel census.
- Near-transparent pixels are ignored, and very small accents may not survive sampling.
- The palette does not guarantee contrast or accessibility; test colour pairs before using them in an interface.
Privacy and file handling
Your image is decoded and sampled in this browser tab with the Canvas API. It is never uploaded, no copy is stored on a server, and no network request carries the file; only the palette values are produced locally.
Read the full privacy policy
