Color Palette Extractor
Extract 4, 6, 8, or 10 dominant colors from any image. K-means in CIELAB, HEX and RGB codes, one-click copy.
In your browser—your files never leave your device.
Learn moreAbout this tool
This tool downsamples your image to 150x150 pixels, converts every pixel into CIELAB color space, and then runs K-means clustering (with K-means++ seeding) to find the centers of 4, 6, 8, or 10 perceptually distinct color groups. CIELAB is perceptually uniform — distances in that space line up with how the human eye actually compares colors — so the resulting palette separates oranges from reds and teals from blues the way you would by sight, instead of collapsing them together the way a naive RGB-bucket count would. The clustering caps at 12 iterations, which is more than enough to converge on real images, and transparent pixels are skipped so logo cutouts don't contaminate the palette.
How to color palette extractor
-
Upload an image
Drag a file onto the dashed box or click to browse. Photos, logos, illustrations, screenshots, paintings, even old book covers all work. The tool reads pixel data so anything the browser can display is fair game.
-
Get the six dominant colors
Extraction takes milliseconds. The result is six swatches with their HEX code and RGB values displayed underneath each one. They are sorted by frequency — the most common color in the image appears first.
-
Copy a color
Each swatch has a copy button that puts the HEX code on your clipboard. Paste it into Figma, your CSS file, a Tailwind config, or wherever you are working. The RGB code is shown alongside if you need to use it in a context that prefers rgb() syntax.
-
Upload another image
The Upload Another button clears the current result and lets you process the next image. Useful when you are building a mood board from multiple references — process each one and write the palettes down side by side.
Why use this tool
Most often: someone shares a logo or screenshot and you need the exact hex codes for a design system or a CSS variable. You could open it in Photoshop and eyedrop each color, but that is slow and you might miss the actual dominant shade. This tool does it in two seconds. Second case: brand mood boards. You collect a dozen reference images for a new project and want to see what colors keep showing up. Run them through here one at a time and you can spot the pattern within a few minutes. Third: art and photography moodwork. Pulling the palette from a painting you like, a film still, or a sunset photo gives you a concrete starting point for a design — way more useful than "warm and earthy" as a brief.
Features
K-means in CIELAB on a 150×150 downsample
The image is downsampled to 150x150 on a hidden canvas — 22,500 pixels total, which is enough to be statistically representative without melting your CPU. Each pixel is converted from sRGB into CIELAB, the perceptually uniform color space, and then K-means++ seeds K cluster centers and iterates up to 12 times until they stabilize. CIELAB matters because RGB-distance lies — two RGB triplets can look very different yet sit close in RGB-space, or vice versa. K-means in CIELAB respects how your eyes actually see color, so the palette doesn't blur related hues together or split nearly-identical shades into two slots.
Pick 4, 6, 8, or 10 colors with frequency-based ordering
A segmented control lets you choose how many colors you want — 4 for a tight minimal palette, 6 for the classic moodboard pull, 8 or 10 when you need more variation (illustration references, complex hero images, multi-product brand sheets). The swatches are sorted by cluster size, biggest first, so the dominant feel of the image surfaces immediately. For a sunset photo the first swatch is usually sky, the second sand or silhouette. For a logo with 3 flat colors and an accent, the 4-color setting gives you exactly those.
HEX and RGB displayed together
Each swatch shows the HEX code (uppercased for paste-into-CSS) and the RGB triplet in parentheses. CSS variable values are HEX. Some design tools default to RGB. Some legacy systems want decimal. All three reads are right there so you do not have to convert. The copy button puts HEX on your clipboard since that is what most workflows want.
Everything stays in the browser
The image gets pulled into a hidden canvas via a blob URL, sampled, and discarded. No network requests after the initial page load. You can run it on a competitor's logo without their analytics catching a third-party reference, and you can run it on internal design files without leaking them to a SaaS color tool.
Privacy & security
This tool runs entirely in your browser. Your files are never uploaded to a server — every step of the process (reading, transforming, downloading) happens on your device using JavaScript and the Web APIs. You can verify this in your browser's network tab: clicking the tool's main action triggers zero requests to our servers. The page itself is served over HTTPS, but once it loads, your data stays put. No accounts, no tracking of file contents, no scanning your inputs.