Palette extractor

Extract a Color Palette from an Image

Generate a clean color palette from any image — choose how many colors, then export it as CSS, JSON, or a PNG swatch sheet.

Перетащите изображение для выбора цветов

Перетащите, вставьте или выберите файл

PNG · JPG · WebP — цвета обрабатываются на вашем устройстве

2–12 colorsExport CSS · JSON · PNG100% free PNG · JPG · WebP

Extract a Color Palette from an Image

A color palette captures the handful of colors that define an image. This palette extractor groups the picture's pixels into clusters using k-means and returns the most representative color for each cluster, sorted by how much of the image it covers. The result is a balanced set you can drop straight into a brand kit, a slide deck, a website theme, or a moodboard.

You decide how detailed the palette is. Two or three colors give you a tight, on-brand scheme; ten or twelve capture the full range of a rich photograph. Each swatch shows its share of the image, so you can see at a glance which colors dominate and which are accents.

Exports are built for real work: a PNG swatch sheet with the hex codes baked in for sharing, a block of CSS custom properties (--color-1, --color-2 …) to paste into a stylesheet, and a JSON file with hex, RGB, HSL, and each color's share for use in code or design tooling.

How to extract a color palette from an image

  1. Add your image — drag & drop, paste, or choose a file.
  2. Set the count — slide from 2 up to 12 colors for the palette.
  3. Copy a swatch — click any color to copy its hex code.
  4. Export the set — download a PNG sheet, CSS variables, or JSON.

Tip: fewer colors for a usable theme

For a website or UI theme, start with 4–6 colors. Too many similar shades make it harder to build consistent components; a smaller palette forces clearer choices and reads as more intentional.

More color tools

Часто задаваемые вопросы

How many colors can I extract?

Anywhere from 2 to 12. Use fewer for a tight brand scheme and more to capture a detailed photo.

How are the palette colors chosen?

The tool runs k-means clustering over a representative sample of the image's pixels, then returns each cluster's average color, sorted by how much of the image it covers.

Can I export the palette to CSS?

Yes. Copy a ready-made block of CSS custom properties, or download JSON with hex, RGB, HSL, and share values for each color.

What is the PNG export?

A horizontal swatch sheet with each color and its hex code, handy for sharing a palette in a doc, chat, or moodboard.

Where is my image processed?

It happens in your browser, so the result is created on your own device. How any data associated with the tool is handled is described in our privacy policy.

Другие инструменты для изображений