Skip to content
hateitall

Color Palette from Image

Turn a photo into a ready-to-paste palette for CSS, SCSS, Tailwind or JSON.

Processed locallyIn: PNG, JPEG, WebP, GIF, AVIF, SVGOut: CSS, SCSS, Tailwind, JSON, PNG

Loading tool…

How to use color palette from image

  1. Drop a photo, artwork or screenshot.

  2. Choose how many colours you want, from 2 to 12.

  3. Order them by how much of the image they cover, from light to dark, or by hue.

  4. Pick a code format, set a variable prefix, then copy or download the code or a swatch PNG.

What this tool does

  • Builds the palette by clustering similar colours, so it reflects the whole image rather than a few pixels.
  • Gives the same palette for the same image every time.
  • Writes CSS custom properties, SCSS variables, a Tailwind colour scale (v3 config and v4 @theme), JSON with RGB and HSL, or a plain hex list.
  • Exports a labelled swatch strip as PNG for mood boards and briefs.

How the result is verified

Every swatch is the average of a real cluster of pixels from your image, and its share is shown on hover so you can see how much of the picture it represents.

Frequently asked questions

How is this different from the image color picker?

The color picker reads single spots you click. This tool summarises the whole image into a palette and writes the code for it.

What do the 100, 200, 300 names mean?

They are only positions in the list, so the variables drop into a Tailwind style scale. Sort light to dark first if you want 100 to be the lightest.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Pick exact HEX, RGB and HSL colours from any image

PNG · JPEG · WebP +→ HEXLight on device

Adjust colours, apply looks, add text and draw on photos

JPEG · PNG · WebP +→ JPEGModerate on device

Frame screenshots with backgrounds, window bars and shadows

PNG · JPEG · WebP→ PNGLight on device