Color Palette Extractor
Drop any photo and extract its dominant colors as hex codes, RGB, and HSL. Export directly to CSS variables, Tailwind config, or JSON.
Drop an image here
JPG, PNG, WebP โ dominant colors extracted instantly
What designers use it for
Match brand assets
Extract the exact hex codes from a logo, hero image, or product photo to keep UI colors on-brand.
Generate Tailwind themes
Pull colors from a mood board photo and instantly paste them into your tailwind.config.js as a custom palette.
Color-match photography
Find the dominant tones in a reference photo to match color grading or set white balance targets.
Build design system tokens
Export as CSS variables or JSON and feed them directly into Figma tokens, Style Dictionary, or any design-token pipeline.
Frequently asked questions
How does the color extraction work?
The tool uses K-means clustering โ a machine learning algorithm โ to find the most representative colors in your image. It samples up to 10,000 pixels, groups them into color clusters, and returns the center of each cluster as a dominant color. The image is downsampled to 300ร300 for speed; the color analysis is still accurate for most photos.
What can I do with the extracted colors?
Export as CSS custom properties (variables) to paste directly into a stylesheet, as a Tailwind CSS config to extend your theme, or as JSON for use in any design system. You can also click any swatch to copy the hex code directly to your clipboard.
Why does the palette sometimes have colors that look similar?
K-means can converge to nearby clusters if an image has a dominant hue with lots of tonal variation (like a blue sky at sunset). Try reducing the color count to 4 or 5 to merge similar tones into a tighter palette, or increase to 8 for more variety.
Is my image uploaded to a server?
No. All pixel analysis runs in your browser using the Canvas API. Your image is never transmitted anywhere โ not to a server, not to any analytics system. It's processed entirely in your browser tab.
What file formats are supported?
JPG, PNG, WebP, and GIF. The tool reads the pixel data from any format the browser can render. Transparent areas (PNG alpha channel) are skipped during color sampling so transparent backgrounds don't skew the palette.
How do I use the palette in Tailwind CSS?
Click "Tailwind Config" โ Copy, then paste it into your tailwind.config.js file (or merge with your existing theme.extend.colors block). Your palette colors become available as `palette-1`, `palette-2`, etc. throughout your project.
More Productivity Tools
Explore our other privacy-focused tools designed to boost your productivity
Excel Password Remover
Remove password protection from Excel files safely in your browser
Excel Books Comparer
Spot differences between two Excel workbooks instantly โ no uploads
Excel Keyword Formatter
Bold, colour, and italicise keywords inside Excel cells โ 100% private