What this tool does
Palette extraction condenses an image into a small "color card": the dominant colors ranked by share, each with hex and RGB values. For UI color references, slide backgrounds or poster moods, it is far faster — and far more objective — than eyeballing pixels.
A typical color picker reports the single pixel under your cursor; this tool histograms the whole image — a 1% noise pixel never sneaks into the result. Hex values copy on click, and everything can be saved as JSON. All computed locally.
How to use
- Drop an image PNG / JPG / WebP all work. Flat icons and posters give crisp palettes; photos with rich gradients yield more of a "mood summary".
- Tune the color count Defaults to 6 (3–10 adjustable). Similar shades are merged before ranking, so even small counts stay distinct — no row of near-identical blues.
- Click to copy, download to keep Click a swatch to copy its #hex; "Download JSON" saves the full palette (RGB + share) for later scripting.
FAQ
Why is a color I see missing from the palette?
Ranking keeps only the most common colors: a tiny accent (a logo highlight, a button) may not make the top N. Raise the color count, or crop that region first.
Why do photos differ from icons?
Photos have continuous gradients that smear across buckets; flat icon colors come out crisp. For photos, 8–10 colors give a more useful summary.
Can shares be used as UI color weights?
Yes — shares always sum to 1. A common mapping: the top color for background, next for text contrast, low-share ones as accents — mirroring the 60-30-10 rule.
Will near-duplicate colors appear twice?
No. The merge rule skips buckets within RGB Euclidean distance 64 of a picked color, so outputs stay clearly separated.
Will huge images be slow?
Histogramming is a single O(pixels) pass inside a Worker; even 20-megapixel images finish in seconds without blocking the page.
Is my image uploaded?
No. Decoding and histogramming run in a browser Worker; the file never leaves your device.
Limits
Quantization uses RGB 4 bits/channel (4,096 buckets), not a perceptually uniform space; gradient-heavy photos may merge near colors.
Outputs 3–10 colors whose shares sum to 1 (transparent pixels excluded).
Histogramming only — no palette-based recoloring. Up to 50MB per file.