Image tool
Steal a palette from any image.
Drop an image — get five dominant colors with HEX, RGB and OKLCH values. The image never leaves your browser.
- Free
- No signup
- Runs in browser
- HEX · RGB · OKLCH
How it works
k-means clustering, right in your browser
We downscale your image to a manageable size, sample every pixel, then run a k-means clustering algorithm to find five colors that best summarize the image. The result is sorted by frequency — the first swatch is the most common color in the image, the last is the least.
Everything happens client-side: no uploads, no analytics on the image, no telemetry. Close the tab and the image is gone.
Drop an image, or click to choosePNG, JPG, WebP — stays in your browser.
FAQ
Frequently asked
What is OKLCH and why use it?
OKLCH is a 2026-friendly color space designed for perceptual uniformity. Adjacent OKLCH values look like adjacent colors to the eye — unlike HSL, where a lightness change can flip the perceived hue. CSS Color Module Level 4 supports it natively. Use it for design systems where you want predictable hover/active states.
How are the dominant colors picked?
We downscale your image, sample every pixel, then run k-means clustering for 12 iterations to find colors that best summarize the image. The first swatch is the most common color, the last is the least.
Can I extract more or fewer than 5 colors?
Yes — the tool defaults to 5 because that maps to a typical brand palette (primary, accent, two neutrals, one highlight). Use 3 for a minimal palette or 8 for a richer source-of-truth.
Does the image leave my browser?
No. The image is loaded into a canvas in your tab, sampled with the standard 2D context API, and discarded when you close the tab. No upload, no telemetry, no server roundtrip.
Why do the colors look slightly different from the image?
The algorithm clusters thousands of pixels into 5 colors — by definition, every output is an average. We also drop transparent pixels and downscale large images for speed. Use a smaller, tighter-cropped image if you want more precise extraction.
More free tools