◐
Runs in your browserNothing is uploadedImages

Color Palette Extractor

Find the 5 to 12 main colours in an image and copy them as hex codes or CSS variables.

Loading tool…
Short answer

Color Palette Extractor finds the 5 to 12 main colours in an image and shows each as a hex code with its share of the picture. Copy one colour or the whole palette as CSS variables. It uses the median cut method and runs in your browser.

How are the colours chosen?

Median cut

All the colours in a scaled-down copy of the image are put in one box, which is split again and again along its widest colour range until there are as many boxes as colours you asked for. Each colour is the average of its box.

Why use Color Palette Extractor?

  • Brand and design palettes. Pull a colour scheme from a photo, a logo or a mood board in seconds.
  • Ready for code. Copy the palette as CSS custom properties and paste it straight into a stylesheet.
  • Your photos stay on your device. Decoding, editing and saving all happen in this browser tab. Nothing is uploaded, so private or unreleased pictures never reach a server.

How to use Color Palette Extractor, step by step

Color Palette Extractor in PrintxPDF with a file loaded, options on the right and the run button below
Color Palette Extractor with a file loaded: the steps below follow this screen.
  1. Add an image to Color Palette Extractor. Any photo, artwork or screenshot.
  2. Choose how many colours. Between 5 and 12. The palette updates as you move the slider.
  3. Copy the colours. Click a swatch to copy its hex code, or Copy as CSS for all of them.

Frequently asked questions

Why is a colour I can see missing?

Small accents cover few pixels, so they may be merged into a larger nearby colour. Ask for more colours to separate them.

Are transparent areas counted?

No. Pixels that are mostly transparent are ignored.

What do the percentages mean?

Roughly how much of the visible picture each colour group covers.

Looking for the long version? The guides cover each of these jobs in depth.