Color Palette Extractor from Image
Upload or paste any image and pull out its dominant colours as HEX, RGB and HSL. Export the palette as CSS variables, Tailwind config, SCSS or JSON, with contrast ratings for text. Processing happens entirely in your browser.
Palette Extractor Workspace
Drop an image, paste a screenshot (Ctrl/Cmd+V) or pick a file. Adjust the colour count and export.
Drop an image, click to browse, or paste a screenshot
JPEG, PNG, WebP, GIF, SVG · processed locally
Output will appear here...Why Designers Use the Agenvix Palette Extractor
Real clustering, developer-ready output and no account required.
Accurate Clustering
Colours are grouped with k-means++ on a downsampled copy of the image, so the palette reflects coverage instead of a few bright pixels.
Developer Exports
Copy CSS custom properties, a Tailwind colors block, SCSS variables, JSON or a plain HEX list straight into your project.
Contrast at a Glance
Each swatch shows the WCAG contrast ratio against black and white so you know which text colour to pair it with.
Private Processing
Unreleased brand assets, client mock-ups and screenshots never leave your device.
Simple as 1-2-3
How the Palette Extractor Works
From pixels to a usable colour system in seconds.
Load an Image
Drop a JPEG, PNG, WebP, GIF or SVG, pick a file, or paste a screenshot directly from the clipboard.
Tune the Palette
Choose 2 to 12 colours, optionally ignore near-white and near-black pixels, and sort by coverage or hue.
Copy or Download
Click any swatch to copy its HEX, or export the whole palette in the format your stack expects.
Palette Export Formats
Where each output format fits in a workflow.
| Feature / Specification | Best Use Case | Engine / Output Standard | Privacy & Security | Performance Rating | Action |
|---|---|---|---|---|---|
| CSS variables | Design tokens in any site | :root { --color-1: … } | Framework agnostic | Universal | |
| Tailwind config | theme.extend.colors | brand: { 1: "#…" } | Tailwind v3/v4 | Popular | |
| SCSS variables | Sass design systems | $color-1: #…; | Legacy stacks | Stable | |
| JSON | Figma plugins, scripts | [{ hex, rgb, hsl, share }] | Includes coverage % | Data | |
| HEX list | Quick sharing | One colour per line | Paste anywhere | Simple |
Extracting Colours from Images
1. How colour quantization works
A photo contains hundreds of thousands of distinct colours. Quantization groups them into a handful of representative clusters. This tool downsamples the image, seeds clusters with k-means++ so that distinct hues are represented, then iterates until each cluster centre is the average of its pixels. Coverage percentages tell you how much of the image each colour occupies.
2. Choosing the right number of colours
Five or six colours capture most photographs and brand images. Logos and flat illustrations often need only three or four, while detailed scenes benefit from eight or more. Ignoring near-white and near-black removes backgrounds and shadows that would otherwise dominate the palette.
3. From palette to accessible UI
WCAG requires a contrast ratio of 4.5:1 for normal text and 3:1 for large text and UI components. Each swatch shows its ratio against white and black so you can decide which colours work as backgrounds and which belong to accents only. Use the Agenvix Color Converter to adjust lightness while keeping the hue.
4. Using the exports
CSS variables drop into any stylesheet, the Tailwind block belongs in theme.extend.colors, SCSS variables suit Sass projects and JSON feeds design-token pipelines or Figma plugins. Rename the generated keys to semantic names such as primary and surface before committing them.
Everything you need to know about Palette Extraction
Accuracy, formats, privacy and exports.
Is my image uploaded?
No. The image is drawn onto a canvas in your browser and analysed locally. Nothing is transmitted.
Why does the palette change slightly between runs?
K-means starts from seeded positions; the k-means++ seeding keeps results stable, but tiny shifts can occur on images with many similar tones. Increase the sample quality for more consistent output.
Which image formats work?
Any format your browser can decode: JPEG, PNG, WebP, GIF, BMP, SVG and AVIF in modern browsers. HEIC works in Safari only.
How do I get the exact brand colour from a logo?
Set the colour count to the number of colours in the logo and enable "Ignore white/black" if the logo sits on a plain background. The dominant swatch will match the flat fill exactly.
What does the coverage percentage mean?
The share of sampled pixels assigned to that colour cluster. It helps distinguish a background colour from an accent.
Can I paste a screenshot?
Yes. Copy an image or screenshot and press Ctrl+V (Cmd+V on Mac) while the page is focused.
What are the contrast badges?
They show the WCAG contrast ratio of the swatch against white and black text. AA requires 4.5:1 for body text and 3:1 for large text.
Can I export to Tailwind v4?
Yes. Copy the CSS variables and place them inside an @theme block, or use the Tailwind config export for v3 projects.
Related Developer Utilities
Discover companion utilities engineered for zero-log speed and browser-side execution.
Color Converter
Convert HEX, RGB, HSL, HSV and CMYK colours with alpha, WCAG contrast checks and tint and shade scales.
CSS Gradient Generator
Design linear and radial gradients with precise colour stops and copy production ready CSS.
EXIF Viewer & Remover
Inspect camera, GPS and timestamp metadata in photos and strip it before sharing - all offline.
Social & OG Image Generator
Design Open Graph, Twitter, Instagram and YouTube images with templates, logos and meta tags.
CSS Box Shadow Generator
Layer multiple box shadows with live preview, elevation presets and copy-ready CSS or Tailwind output.
Image Converter
Convert PNG, JPG, WebP, BMP, GIF, TIFF images in your browser with zero server upload.
More in Media & Graphics
Specialized utilities within the same technical domain
