AIColors

FREE TOOL · 100% LOCAL

Extract Colors From Any Image

Drop, paste, or select an image and instantly get its dominant palette via perceptually accurate k-means clustering in OKLab. Pick individual pixels for branding work. Nothing is uploaded — the entire pipeline runs in your browser.

Your image stays on your device. Always.

Every other "image color extractor" we tested in 2026 either uploads your photo to a third-party server or runs it through a captcha gate. We do neither. The image you drop is decoded into a canvas in your browser, sampled and clustered locally, then discarded when you close the tab. There is no upload, no server, no analytics on the image data, no log. If you can run this page offline after the first load, you can extract colors offline.

How it works

k-means clustering in OKLab — what most tools get wrong

Most image palette tools take a "naïve average" approach: bucket pixels into RGB bins, return the most common buckets. The result is muddy because RGB distance does not match how human eyes perceive color similarity. We do it differently.

1

Sample in OKLab

Pixels are converted into OKLab — a perceptually uniform color space — before clustering. Distances in OKLab match what your eye calls "similar".

2

k-means++ seeding

We seed cluster centers with k-means++ — picking initial centers spread across the color space — so the result is stable and rarely lands in a poor local minimum.

3

Convert back to sRGB

Centroids are converted back to sRGB / hex for display. You see colors that actually appear in the image, weighted by perceptual frequency rather than raw RGB volume.

Tip

Dominant palette vs picked pixel — they are different tools

A dominant-color palette tells you what the image is mostly made of. A picked pixel tells you the exact color of one point. Most people confuse these and ask "why is the brand color not in the dominant palette?"

If your goal is to build a brand palette from a photograph, start with the dominant palette and accept that small but visually important colors (a logo accent, a single piece of fruit, an eye color) may not appear. Use the pixel picker to capture those specific colors and add them manually.

If your goal is to identify the exact color of a UI screenshot or a print proof, use the pixel picker directly. Dominant clustering is the wrong tool — it will average away the value you want.

Frequently asked questions

Is this image color extractor free?
Yes — fully free, no signup, no ads, no upload. All processing happens locally in your browser using the Canvas API.
Does my image leave my device?
No. The image is read into a canvas in your browser, sampled, clustered, and then forgotten. We do not upload it, we do not log it, and there is no server-side image processing.
How many colors should I extract?
For brand work, start with 5 or 6 — enough variety without dilution. For art / mood references, go higher (8–10). Below 4 you tend to lose distinct hues; above 10 you start getting near-duplicates that add noise rather than signal.
Why does the palette change slightly each time I re-roll?
k-means starts from randomized centroids. Even with k-means++ seeding, two runs on the same image may converge to slightly different palettes — usually within a few hex points. Re-roll a few times and pick the version you like best.
What image formats are supported?
Anything your browser can decode: PNG, JPG, WebP, GIF, AVIF, BMP, SVG. We downscale to 600px max dimension before processing to keep it fast.
Can I extract from a URL or paste an image?
Pasting works — copy any image to your clipboard and press ⌘V / Ctrl+V anywhere on the page. URL extraction would require a server-side fetch (CORS blocks browser fetches of arbitrary image URLs), which would break our "everything local" promise, so we skip it.
Why OKLab instead of RGB clustering?
RGB distance is not perceptual: a pixel-distance of 10 in the blues looks very different from a pixel-distance of 10 in the yellows. OKLab is designed so that equal numeric distances correspond to equal perceived color differences. Clustering in OKLab produces palettes that look right to humans, not just to a histogram.
How is the picked pixel different from a swatch?
The swatches are cluster centroids — averaged across many similar pixels. The picked pixel is one exact RGB value from a specific point. Useful for catching a logo color or a specific accent that gets averaged into a neighbouring cluster.

Pair with our other color tools