Image Tools

Extract Colour Palette from Image

Extract the dominant colours from any image with perceptual k-means clustering. See how much of the image each colour covers, its HEX, RGB and nearest name, and text contrast; pick any pixel with the eyedropper; and export the palette as CSS, SCSS, Tailwind, JSON, GIMP .gpl, Adobe .ase or a PNG swatch strip.
Runs in your browserNothing is uploaded

Image

Drop an image herePNG, JPG, WebP, GIF, BMP or AVIF. Processed on your device.

How to use this tool

  1. 1Drop, paste or choose an image.
  2. 2Choose how many colours to extract and whether to skip a white or black background.
  3. 3Click a swatch to copy it, or click the image to pick an exact pixel.
  4. 4Copy or download the palette in the format you need.

Frequently asked questions

Pixels are grouped with k-means clustering in OKLab, a colour space where equal distances look equally different to the eye. Each swatch is the average colour of one group, and the percentage is how much of the image that group covers.

Yes. The clustering uses a fixed random seed, so the same image and settings always produce the same colours.

Large white or black backgrounds are real pixels. Turn on “Ignore white and black background” to leave them out, which is useful for logos and product photos. Transparent pixels are skipped by default.

CSS custom properties, SCSS variables, a Tailwind colours block, JSON, a GIMP/Inkscape .gpl palette, an Adobe Swatch Exchange (.ase) file for Photoshop and Illustrator, a plain HEX list, or a PNG image of the swatches.

No. The colours are calculated in your browser and the image never leaves your device.