Design tools

Image Palette Generator

Image Palette Generator

Turn any photo into a colour palette and export it as CSS, Tailwind or JSON.

About this tool

About Image Palette Generator

Photographs and artwork are one of the best sources of colour schemes that feel natural together. Drop an image and this generator builds a palette of its key colours, eight by default, using k-means clustering in the OKLab colour space so the swatches reflect the tones you actually notice. Each colour shows how much of the image it covers, and you can sort the palette by usage, by lightness for a tidy light-to-dark ramp, or by hue for a rainbow order. Copy individual swatches as HEX or RGB, or export the whole palette as CSS custom properties, a Tailwind v4 theme block, JSON or a plain list for Figma or Sketch. Want one particular colour? Click it on the image. It's a quick way to build a mood board, match a website to a hero photo, or theme slides around a brand image, and it all happens in your browser.

Built and maintained by Abhi JainUpdated

How to Make a Palette from an Image

  1. 1

    Drop a photo

    Drop an image or choose one from your device.

  2. 2

    Adjust the palette

    Change Number of colours and Sort by until the palette feels right.

  3. 3

    Export

    Copy swatches, or export CSS, Tailwind v4, JSON or a HEX list.

Image Palette Generator: questions and answers

How many colours should a palette have?

Five to eight works for most brands and websites: one or two main colours, a neutral or two, and accents. Start with eight and drop the ones you don't need.

Why aren't the most vivid colours always included?

Small, bright details cover little of the image, so clustering can merge them into a nearby tone. Raise the number of colours, or click the detail to pick it exactly.

Can I make a full colour scale from one swatch?

Yes. Copy it into the Color Palette Generator to get a 50–950 scale and harmonies.

Is my photo uploaded?

No. It's analysed in your browser and never leaves your device.

More Color Extractor from Image presets