Sunset photo → 5-colour palette
Sunset JPG: 1920×1080
[#1B2845 (38%), #E08E45 (24%), #F2D478 (18%), #6B3232 (12%), #FFF6E0 (8%)]
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
Extract dominant color palette from images
Loading interactive tool…
Great colour palettes are hidden in photos you already have — a brand photograph, a movie poster, a competitor screenshot. This tool extracts dominant colours using k-means clustering: it groups the pixels in your image into colour clusters and returns the centroid of each as a representative swatch. Unlike counting pixel frequency, clustering surfaces meaningful perceptual groups — the warm gold in a sunset, the deep navy of the sky — not just the most common background grey. Choose 5, 8, or 12 swatches; each result shows HEX, RGB, and HSL with a one-click copy and a percentage indicating how much of the image that colour represents. A full export gives ready-to-use CSS custom properties or a Tailwind colours block. Everything runs in your tab using Canvas pixel reads — no image is uploaded.
K-Means Clustering Algorithm: Rather than counting every pixel's exact colour, k-means groups pixels into perceptual clusters and returns each cluster's centroid. This surfaces meaningful colour relationships — accent oranges hidden among millions of background grey pixels — that a simple frequency count would bury under monotone backgrounds.
5, 8 or 12 Colour Palette: Pick how many swatches the algorithm should find. Five colours give a clean primary/secondary/accent/neutral/highlight structure ideal for branding. Eight suits hero section design and richer UI palettes. Twelve is useful for full brand guide generation or matching a complex illustration's entire colour story.
HEX, RGB, HSL Output: Every swatch displays in all three common formats. Click the copy icon to put the value directly on your clipboard for pasting into Figma colour styles, CSS variables, design tokens, or a Tailwind configuration file — no manual transcription between colour spaces.
Pixel-Frequency Indicators: Each swatch shows what percentage of the image's pixels belong to its cluster. This makes it easy to identify the true dominant colour (50%+), the secondary accent (10-25%), and rare-but-noticeable highlight colours (2-5%) — the structural hierarchy behind a well-composed palette.
Tailwind and CSS Variables Export: The export feature generates ready-to-paste CSS custom properties (--color-1: #…) or a Tailwind colours config block you can drop directly into tailwind.config.js. This bridges the gap between visual inspiration and production code without manually retyping a single hex value from the palette swatches.
Browser-Local Analysis: The photo is drawn onto a Canvas element, pixels are read via getImageData, and clustering runs in JavaScript — all inside your browser tab throughout the analysis. Unreleased brand mockups, client photos, and confidential design assets never leave your device during the colour extraction process.
Sunset JPG: 1920×1080
[#1B2845 (38%), #E08E45 (24%), #F2D478 (18%), #6B3232 (12%), #FFF6E0 (8%)]
Figma export PNG: 2400×1500
[#FFFFFF (52%), #0F172A (24%), #3B82F6 (12%), #F59E0B (8%), #10B981 (4%)]
Poster JPG: 1080×1620
[#000000 (40%), #C4271A (28%), #F1B963 (16%), #FFFFFF (10%), #4D2818 (6%)]