فارسی

Extract a Color Palette from an Image

Choose an image to see its main colours in HEX, RGB and HSL. Choose how many colours you want, then copy or download the palette.

Use this tool in your browser without installing software.

About this tool

A real photo holds thousands of colours, but a design usually needs five to eight main ones. This page reads the image in your browser, skips transparent pixels, and uses median cut to group close colours; the average of each group becomes one palette colour. Each colour comes with its share of the sampled pixels, so you can see how much of the sample each group covers. You choose between 4 and 12 colours, and transparent pixels can be ignored when the image has them. Every card shows HEX, RGB and HSL; one click copies it, and the whole palette downloads as JSON. To keep large photos responsive, sampling runs on a scaled copy. The image is never uploaded.

How to use it

  1. 1

    Choose an image or drop it in the box; PNG, JPG, WebP and GIF up to 10 MB are accepted.

  2. 2

    Pick the number of colours, and set “Ignore transparent pixels” if the image has transparency.

  3. 3

    Click a card to copy its HEX value, or copy or download the whole palette as JSON.

If the file will not open

  • The image will not open.

    The file must be PNG, JPG, WebP or GIF and under 10 MB. If the file is fine, reload the page once.

  • The palette is empty.

    The image may be fully transparent or have very few coloured pixels. Clear “Ignore transparent pixels” and try again.

  • The colours do not look exact.

    Real photos hold thousands of shades, and the palette shows the average of each group. Raise the colour count, or use the image colour picker for one exact pixel.

Frequently asked questions

How is the palette built?

The image colours are split into groups of close values, and each group becomes one colour. The method is called median cut; on real photos it gives a more readable result than counting every exact colour.

What does the percentage next to a colour mean?

It is that colour’s share of the sampled pixels. A 40% share means about four in ten sampled pixels are in this colour group, so it is probably the background or the main clothing. The displayed shares may not add up to exactly 100% because of rounding.

Why is the number of colours different from what I chose?

If the image has fewer real colours than that number, the palette is shorter; it never invents duplicates. The opposite can happen too: with a low count, two close colours merge into one card.

What happens to transparent pixels?

By default, pixels with less than 50% opacity are skipped so a transparent background does not become a palette colour. Clear the box if you want every pixel counted.

Is my image sent anywhere?

No. Reading the image, sampling and building the palette all happen in your browser, and no file is uploaded.