lab980 / palette

Pull the colours out of an image.

Drop in a photo, screenshot or logo. You get its dominant colours as hex, RGB, HSL, CSS custom properties and a Tailwind block — ready to paste. Extraction happens in this tab: the image never leaves your machine.

Drop an image here

or , or paste one from the clipboard

PNG, JPEG, WebP, GIF, AVIF or SVG · up to 25 MB

How it works

Quantization, not sampling

The image is scaled to 256px on its long edge, then reduced with a modified median cut over a 5-bit histogram and refined with k-means in CIE Lab. That is why you get the colours the image is made of, rather than whatever happened to sit under a grid of sample points.

Roles, not just a list

Each colour is scored against the vibrant/muted × light/dark targets, so the swatch you actually want for a heading or a background is labelled rather than left for you to eyeball.

Contrast is a pair, not a colour

No single swatch has a WCAG level — only a swatch on another one does. So the pairings are committed to and rendered at real text sizes, and the colour-vision check asks a different question again: whether two colours stay tellable apart once hue is gone.

Two ways out of a failure

A red verdict is a button. Press it and the colour is walked along lightness — hue and chroma held, chroma given up only if lightness alone cannot get there — until it clears the threshold, and the preview redraws in the colour it found. The other way is to use a colour you already have: every swatch the pairings do not place is assessed against every slot they do.

Nothing is uploaded

There is no server side. The page is static files; the pixels are read with the Canvas API in your own browser and are gone when you close the tab.