ToolFeather
Image & MediaRuns in your browser

Extract a Color Palette from an Image

Load a picture and pull out its dominant colors as HEX swatches you can copy — computed entirely on your device.

Quick presets

Image Palette Extractor

Palette
Export
How the colours are chosen
  • k-meansPixels are grouped into clusters by perceived similarity; each swatch is a cluster's average colour and its share of the image.
  • OKLabClustering happens in OKLab (Ottosson, 2020), a perceptual colour space — so two swatches that look alike are merged, unlike plain RGB averaging.
  • ContrastEach swatch shows whether white or black text reads better on it, using WCAG 2.2 contrast ratios.

Runs in your browser — nothing you enter is uploaded or stored.

ToolFeather · Dominant colours
Scratchpad auto-saved
Stored in this browser (localStorage)

About the Image Palette Extractor

A color palette is the handful of colors that define an image's look. This tool extracts them automatically: it shrinks the picture to a small thumbnail for speed, reads every pixel with getImageData, and groups similar colors into buckets by rounding each channel. The most populated buckets are the dominant colors, and each swatch shows the average color of its bucket for an accurate result.

Pick how many colors you want — 6, 8, or 10 — and the swatches update, most-common first, each labelled with its HEX code. Click any swatch to copy that HEX to your clipboard for use in CSS, a design tool, or a brand guide.

Fully transparent pixels are ignored so they do not skew the results. Everything is computed in your browser, so you can pull palettes from private mockups, photos, and brand assets without uploading anything.

Examples

A photograph → an 8-color palette to build a matching design theme.
A brand logo → confirm and copy its exact HEX values.
A moodboard image → extract colors to seed a website's color scheme.

Frequently asked questions

5 answers
How are the colors chosen?
The tool buckets similar colors together and ranks the buckets by how many pixels fall in each. The biggest buckets are the dominant colors, shown as their average value.
Why downscale the image first?
Sampling a smaller version is far faster and still captures the overall color distribution accurately, so the palette is the same but computed instantly.
Are transparent areas counted?
No. Pixels that are mostly transparent are skipped so they do not add a false color to the palette.
Can I copy a color?
Yes. Click any swatch and its HEX code is copied to your clipboard, ready to paste.
Is my image uploaded?
No. All pixel analysis runs locally in your browser, so private images stay on your device.