Upload any image to extract its dominant colors — get HEX, RGB, HSL, export CSS variables, and explore color harmonies.
A color palette is a curated set of colors used consistently across a design. In web design and UI/UX, palettes establish visual identity, brand recognition, and aesthetic harmony. A well-chosen palette typically includes a primary brand color, secondary accent colors, neutral backgrounds, and semantic colors (success green, error red).
This tool uses the HTML5 Canvas API to read every pixel of your uploaded image directly in the browser — no server upload required. It then applies a median cut quantization algorithm to group similar colors and identify the dominant hues. The result is a palette of the most representative colors in the image, sorted by frequency (how many pixels belong to each color group).
#6F42C1
). Most common in web CSS.
rgb(111, 66, 193)
). Used in CSS and image editors.
The tool reads every pixel via the HTML5 Canvas API and groups similar colors together using a clustering approach. The "dominant" colors it surfaces are dominant by pixel count — the colors that occupy the largest areas of the image. This is useful for extracting background tones, sky colors, and large product areas. It's less reliable for finding small, visually interesting accent colors: a tiny red logo on a large white background will contribute far fewer pixels than the white does, and may not appear in the top 5 extracted colors at all.
Practical consequence: if you're extracting a brand palette from a product photo, zoom or crop the image to emphasize the colors you actually want before dropping it in. A photo that's 80% background sky will give you a sky-heavy palette. Cropping to the product itself, or using the logo PNG instead, gives you the colors that actually matter.
| Image type | Results you'll get | Tips |
|---|---|---|
| Product photo on white | Mostly off-whites, maybe the product color | Crop to the product area. Remove the background if you can (remove.bg, Figma background removal). |
| Brand logo PNG (transparent bg) | Clean, accurate brand colors | Best source for extracting brand palettes. Flat vectors extract cleanly with few colors. |
| Landscape photography | Atmospheric sky tones, mid-range greens/browns | Good for mood-board palette work. Adjust the number of colors up to 8+ to capture range. |
| Heavily compressed JPEG | Muddy, slightly off versions of the real colors | JPEG compression introduces color noise. PNG or high-quality exports give cleaner extraction. |
| Screenshot of a website | Mix of UI colors, likely dominated by white/light grey | Crop to a specific component, not the full page. Better: export the design file directly. |
Extracted palettes frequently contain beautiful mid-tone colors that fail WCAG contrast at any text size. Before using an extracted color as a text color or a background with text on it, run it through the contrast checker. A color you love aesthetically may only work as a decorative element, not functional UI.
The rule is real and useful, but the 60% color is almost always white, light grey, or off-white in real web interfaces — not the brand color. Brand colors work as the 30% secondary (backgrounds, buttons, section fills) and the 10% accent (CTAs, highlights, icons). Applying a saturated brand color to 60% of the UI consistently looks overwhelming in practice.
Image pixels are affected by lighting, photography, and compression. The extracted #3B6E4A might be a slightly dull version of a green that should actually be #2D7A45 in the actual brand. Use extracted values as starting points, then push them toward your intended brand values by adjusting lightness and saturation in a color tool.
The CSS export gives you a :root { --color-1: ...; } block. That's step one. Step two: for each key brand color, generate a 9-step shade scale (using HSL lightness increments from 10% to 95%). This is what makes a palette actually usable across a full UI — buttons need a hover state, backgrounds need multiple tones, text needs different weights.
Extracting 10+ colors from an image often gives you near-duplicates — five slightly different shades of beige from a photo's background gradient. A palette of 4–6 distinct, well-separated colors is almost always more useful than 10 similar ones. Reduce the count slider and look for colors that feel clearly different from each other.
Transparent PNGs composed over a white canvas background will include white in the extraction even if the original had no white. The Canvas API reads composited pixel values including the page background. If you need pure extraction from a transparent PNG, the results will reflect whatever the canvas background color is — usually white.