About Color Palette Extractor
Pull a colour palette out of any image in your browser. Designers do this when they want to match a brand to a hero photo; developers do it when they need accent colours for a UI; everyone does it occasionally because something just looked good and they want to know why. SnapToolz' Palette Extractor uses median-cut quantisation — the same algorithm PNG quantization is built on — to find the 4-10 most representative colours. Click any swatch to copy its HEX, RGB, or HSL value, or download the whole palette as a PNG strip. Runs entirely on your device.
- No uploads
- Browser-only
- Works offline
- 100% free
How it works
- 1
Drop your image
JPG, PNG, WebP, GIF or AVIF. The image is downscaled to 200 px on its longest edge for fast processing.
- 2
Choose palette size
4 colours for a tight brand palette, 6 for hero images, 8-10 for richly-coloured photographs.
- 3
Copy or download
Click any swatch to copy its hex; or click the RGB / HSL value below for those formats. Download a PNG strip for design specs.
What 'dominant colours' means — and how quantisation finds them
An image with thousands of distinct colours doesn't have an obvious 'top 5' — you have to define one. Colour quantisation does that by partitioning every pixel into a small number of buckets of similar colour, then reporting each bucket's representative shade. This tool uses median-cut, the same classic algorithm behind PNG colour reduction and ImageMagick: it repeatedly splits the colour space along the channel with the greatest spread until it has as many buckets as you asked for, then returns each bucket's average. Crucially, median-cut is deterministic — drop the same photo twice and you get the same palette every time, which matters when a palette is going into a brand spec that has to be reproducible.
That determinism is also why this isn't k-means clustering. K-means produces comparable palettes but seeds randomly, so two runs on the same image can return slightly different colours — fine for art, frustrating for a documented brand palette. Median-cut trades a touch of theoretical optimality for repeatability, which is the right call here.
Dominant is not what your eye calls the 'main' colour
The single most common surprise: the largest bucket is often a colour you barely notice. A product shot on a white sweep is mostly white pixels, so white dominates; a screenshot is mostly its background chrome. The algorithm is counting pixels, faithfully — it just turns out the colour that covers the most area is frequently the backdrop, not the subject. That's why the 'ignore near-black / near-white' option exists: stripping heavy white backgrounds and dark UI before quantising stops the background from eating slots you wanted for the actual content.
The other limit worth stating plainly: this returns the colours that are in the image, not a colour scheme derived from them. It won't hand you complementary, triadic, or analogous palettes — for those, take the dominant hues and rotate them in HSL, or paste a base colour into a colour-theory tool. Extraction is observation, not generation.
Where extracted palettes actually earn their keep
- Branding from an asset: pull a defensible brand palette straight out of an existing logo or hero image when no official swatch sheet exists, then lock the hex values into the style guide.
- Data-viz and theming: derive chart colours or a UI accent set from a photograph so the interface feels of-a-piece with its imagery instead of bolted on.
- Design hand-off: export the palette as a PNG strip and drop it into a spec; pair it with the gradient generator to blend two dominant colours into a background, or feed values to the colour converter for print-ready CMYK.
- Mood and consistency checks: extract palettes from several candidate images to see which share a coherent colour story before you commit them to the same page.
Getting a clean palette: size and pre-processing
Match the palette size to the source. Four colours suit a tight brand palette where you want only the anchors; six is a good default for a hero image; eight to ten captures the range of a richly coloured photograph without descending into near-duplicate shades. Ask for too many buckets on a simple image and median-cut starts splitting hairs — returning three barely distinguishable blues that no human would treat as separate colours. The tool downsamples to about 200 px on the longest edge before analysing, which is deliberate: it's fast and, because dominant colours are an area statistic, the small loss of fine detail doesn't move the result. If a stubborn background still dominates, enable the near-black/near-white strip and re-extract.
Frequently asked questions about Color Palette Extractor
How is the palette computed?
Median-cut quantisation. The image is downsampled to 200 px on the longest edge, the pixels are bucketed into k regions of similar colour by repeated splitting along the channel with greatest variance, and each bucket's mean colour is returned. Same algorithm used by PNG quantization, ImageMagick, and most native palette tools.
Why not k-means clustering?
K-means produces similar results but is non-deterministic (different random initialisations give different palettes) and slower on large images. Median-cut is repeatable: drop the same photo twice and you get the same palette.
Can I get a complementary palette?
Not directly — the tool returns the dominant colours in the source image, not derived palettes. For complementary / triadic / analogous colours, use the HSL output and rotate the hue manually (or paste the result into a colour theory tool).
What does 'ignore near-black / near-white' do?
Strips heavy white backgrounds (slide decks, product shots) and dark UI chrome from the input before quantisation. Useful when the background colour would otherwise dominate the palette.
Privacy, offline use, browser support, and pricing questions are answered on the site-wide FAQ.