Image colour palette extractor
Extract a sampled palette, inspect colour contrast and download reusable swatches.
A clear answer. Here’s how.
Samples a browser-decoded PNG/JPEG/WebP (up to 10 MB and 16 million pixels) on a 64 × 64 canvas. Fully transparent pixels are ignored; other transparency is composited on white. Deterministic, frequency-weighted RGB k-means uses farthest-point initial centres and up to 30 iterations. Duplicate rounded colours are merged; fewer distinct colours can be returned. Shares refer to sampled pixels, not exact full-resolution areas. The contrast matrix uses WCAG relative luminance; AA normal-text markers use the unrounded 4.5:1 threshold. Exports SVG swatches and CSS variables. This is an RGB approximation, not perceptual clustering or print-colour matching.