The Image Color Extractor pulls the dominant colours out of any image and turns them into a copyable palette. Upload a photo, artwork, screenshot, or logo, choose how many colours you want, and the tool analyses the pixels and returns representative swatches with their hex codes.
It is perfect for building a palette from a mood-board image, matching a design to a photo, or grabbing brand colours from a screenshot. The whole process runs in your browser using a canvas — your image is never uploaded to a server.
How to use the image color extractor
- Drop an image onto the upload area or click to choose a file.
- Pick how many colours to extract (4 to 12).
- Click any swatch to copy its hex code.
- Export the whole palette as CSS variables or an array to use in your project.
How the colours are extracted
The tool draws your image to an off-screen canvas, reads the pixel data, and runs a median-cut algorithm — the classic method for reducing an image to a small, representative palette. Median cut repeatedly splits the set of colours along its widest channel, so the result captures the distinct colours in the image rather than just the single most common one. The image is scaled down first for speed, which does not noticeably change the resulting palette.
Choosing the number of colours
Fewer colours (4–6) give you the broad, dominant tones — good for a brand or theme palette. More colours (8–12) capture subtler tones and gradients, which is useful for detailed illustrations or photos with lots of variation. Try a couple of values to see which best represents the image; the palette updates instantly.
Privacy and file support
Everything happens locally in your browser — the image is read with an object URL and processed on a canvas, and nothing is sent to any server. Common web image formats work, including PNG, JPG, WEBP, and GIF. Because it is client-side, large images are scaled down before analysis so extraction stays fast.
Frequently Asked Questions
How do I get a colour palette from an image?
Upload the image, choose how many colours you want, and the tool extracts the dominant colours as swatches. Click any swatch to copy its hex, or export the whole palette.
Is my image uploaded to a server?
No. The image is processed entirely in your browser using a canvas — it never leaves your device.
How many colours can I extract?
Between 4 and 12. Fewer colours highlight the dominant tones; more colours capture subtler variation in the image.
Which image formats are supported?
Common web formats including PNG, JPG, WEBP, and GIF. Large images are automatically scaled down before analysis for speed.
How are the dominant colours chosen?
The tool uses a median-cut quantisation algorithm, which splits the image’s colours into representative groups and averages each group. This captures the distinct colours rather than just the most frequent pixel.