Image Color Palette Extractor
Upload an image to extract its dominant colors using median-cut quantization, the same category of algorithm real image editors use for palette reduction. Pick 2–10 colors; each is shown with its share of the image and copyable as HEX, RGB, or HSL with one click. Mostly-transparent pixels are excluded so a transparent background doesn't skew the result. Runs entirely client-side using the Canvas API — nothing is uploaded.
About this tool
This tool extracts a dominant color palette from an image using median-cut quantization — the same category of algorithm real image editors use for palette reduction. It repeatedly splits the widest-ranging group of sampled pixel colors in half at the median, until there are enough groups, then averages each group into one representative color; groups that end up averaging to the same color (common in a near-flat-color image) are merged rather than shown as duplicates. Each color's percentage reflects how much of the sampled image it represents — the largest share appears first. Mostly-transparent pixels are excluded so a transparent background doesn't skew the palette. The image is downscaled before sampling for performance, which doesn't meaningfully change the resulting palette since color extraction doesn't need full resolution. It runs entirely client-side using the Canvas API — nothing you upload is ever sent anywhere.
What you can do
- Extract 2–10 dominant colors from any image using median-cut quantization
- Each color shown with its share of the image
- Copy any color as HEX, RGB, or HSL with one click
- Nothing is uploaded — the image is processed locally in your browser
How to use
Step 1
Upload an image
Any common image format your browser can display.
Step 2
Adjust the color count
2 to 10 — the extracted palette updates immediately.
Step 3
Copy a color
Click any hex code, RGB, or HSL value to copy it.
Example
A photo of a sunset
Palette
#FF6B35 38% #F7C59F 24% #2E1E3B 19% #EFEFD0 12% #004E64 7%
extracts its dominant colors ranked by how much of the image each one covers — useful for pulling a color scheme directly from a reference image.
How your data is handled
This tool is labeled 🟢 Browser: your image is drawn to an off-screen canvas and its pixels are analyzed directly in your browser — nothing is uploaded to a server, and nothing about it is retained once you leave the page.
Frequently asked questions
How is the palette actually computed?+
Median-cut quantization: sampled pixel colors are repeatedly split into groups by their widest-ranging color channel, then each final group is averaged into one representative color. It's deterministic — the same image and color count always produce the same palette.
What does the percentage next to each color mean?+
The share of sampled pixels that group's color represents — a higher percentage means that color covers more of the image, not that it's more "important" in any other sense.
Why might a near-solid-color image return fewer colors than I asked for?+
If the image genuinely doesn't have that many visually distinct colors, some of the extracted groups end up averaging to nearly the same result and are merged, rather than presenting duplicate or near-duplicate colors as if they were meaningfully different.
Does resizing the image before sampling affect the palette's accuracy?+
Not meaningfully — the image is downscaled for performance before sampling, but color extraction is about capturing dominant colors and their proportions, which a large image's full resolution doesn't materially change.
Is my image uploaded anywhere?+
No — it's drawn to an off-screen canvas and analyzed directly in your browser using the Canvas API. Nothing here ever leaves your device.