Image Color Palette Extractor
Extract 3, 5, 8 or 10 dominant colours from an image with HEX, RGB and HSL values, copy buttons and ready-made CSS custom properties.
Extract 3, 5, 8 or 10 dominant colours from an image with HEX, RGB and HSL values, copy buttons and ready-made CSS custom properties.
Image Color Palette Extractor finds the dominant, visually distinct colours in a photo, logo or screenshot. Choose 3, 5, 8 or 10 colours and get each one as HEX, RGB and HSL, with a copy button for every value, its approximate share of the image, and a block of CSS custom properties you can paste into a stylesheet.
The image is analysed on a canvas in your browser. Pixels are grouped by perceived colour (in the CIELAB colour space), very similar shades are merged so the palette stays distinct, and transparent or mostly transparent pixels are ignored. Nothing is uploaded.
The image is downscaled, its pixels are grouped by perceived colour with k-means clustering in CIELAB space, and the largest groups are kept while near-duplicate shades are merged.
Some images contain fewer visually distinct colours than requested. Rather than repeat almost-identical shades, the tool shows only the distinct ones and tells you.
Transparent and mostly transparent pixels are ignored. If every pixel is transparent, you get a clear message instead of a palette.
No. Everything is calculated in your browser, and the file is never sent anywhere.
It is the approximate share of analysed (non-transparent) pixels that belong to that colour group.
Yes. Paste the :root block into your stylesheet and use var(--palette-1) and so on. The -rgb variables help with semi-transparent colours, e.g. rgb(var(--palette-1-rgb) / 50%).