Free · In-browser k-means · Tailwind-aware

Pull a palette out of any image.

Drop an image — photo, screenshot, logo, whatever — and get back 5, 8, or 12 dominant colors with their nearest Tailwind shade and a copy-ready CSS block.

How many colors

Drop an image to extract its palette.

How it works

Four steps

  1. 1

    Drop an image

    Photos, screenshots, album art, logos — anything raster.

  2. 2

    Pick how many colors

    5, 8, or 12. More clusters catches subtler hues; fewer surfaces the dominant tones.

  3. 3

    Read the palette

    Each swatch shows hex, weight, and the nearest Tailwind shade for quick design-token mapping.

  4. 4

    Copy

    Individual hex, Tailwind shade key, or the whole palette as CSS custom properties.

Questions

Frequently asked

Is the image uploaded anywhere?+

No. The extractor resamples the image onto a 120×120 canvas in your browser and runs k-means on the pixel data. Nothing leaves the page.

Why does the palette change each time I re-extract?+

K-means seeds its centroids with k-means++, which has randomness baked in. For most images the top 3–4 colors are stable; the deeper clusters can vary. Run it a couple of times and pick the result that feels right — all valid palettes of the image.

What's the Tailwind-nearest match?+

For every extracted swatch we compute the squared-RGB distance to every Tailwind palette swatch (22 colors × 11 shades) and surface the closest. Useful when you want your palette to line up with your existing Tailwind tokens.

Can I use this on full-res photos?+

Yes — we downscale for speed, so throwing in a 4K image won't slow anything down. The downsample preserves color distribution faithfully.

More free tools

Keep building

— Shipping to the App Store?

Translating screenshots into every locale is what lokal was built for. Upload once, ship to every store.

Explore lokal