Buddy Code
Create account ↗
All tools
Free to use · No sign-up

Image palette extractor

Find representative image colours and copy HEX values or CSS custom properties.

What it does

Find representative image colours and copy HEX values or CSS custom properties.

How to use it

  1. Choose JPEG, PNG or WebP up to 20 MB and 40 megapixels. Select a maximum of 2–12 colours, then extract.
  2. The image is sampled at up to 256 pixels per side. Pixels with alpha below 50% are ignored; remaining pixels use their RGB channels without compositing.
  3. Copy a swatch HEX value or all CSS variables. Files and colour values stay local unless you explicitly copy them.

Example

An opaque single-colour red image yields #ff0000, even when six colours are requested.

Methodology

RGB channels are quantised into 16 levels per channel. The most frequent bins are returned using the mean RGB colour in each bin.

Limitations

Frequency sampling is approximate and can return similar colours. It does not identify semantic accents or guarantee contrast. Transparent images may produce no palette.

Automation

This tool runs in your browser. No upload API or MCP endpoint is available.

View capabilities and documentation

Reference updated

Join the conversation

Helpful tips, questions, and ideas for making this tool better.

Loading discussion…