DO IT EASY APP
English

Extract a colour palette from an image

Find the dominant colors in an image: copy them as HEX codes, shares and CSS variables.

  • No sign-up, no fees.
  • Find the dominant colors in a photo: 4, 6, 8 or 12 colors.
  • The HEX code and approximate share of each color.
  • Copy a single color or the whole palette with one click.
  • Also available as CSS variables.
  • Your files are processed, but never shared with anyone.

Color palette from image: how to use the Color Palette Extractor

Using the colors of a photo you like in your design takes four steps:

  1. Choose your image. Click the box above and pick your photo, logo or screenshot, or drag it onto the box.
  2. Pick the number of colors. For Number of colors, 4, 6, 8 or 12. Fewer colors catch the main mood, more colors catch the details.
  3. Look at the palette. Colors are sorted from largest to smallest by the area they cover in the image. The approximate percentage is written on each color.
  4. Copy. Take a single color's HEX code with the button next to it. For the whole palette use the buttons below: the first copies the HEX list in the form #3366CC, #FFCC00, …, the second copies CSS variables (--color-1: #3366CC;).

What is a color palette?

A color palette is a small list of colors used together in a design. Websites, logos, presentations, social media posts and even home decor often look consistent with a palette of 4-6 colors. A beautiful photo is a great source for a ready-made palette: a sunset gives warm oranges, a forest calm greens, the sea cool blues.

This tool automates finding color codes from an image. The pixels in a shrunken copy of the image are sampled and similar colors are split into groups (an approach similar to the median cut method). The average color of each group becomes one color of the palette. Transparent pixels aren't counted. The method isn't random; the same image and the same number of colors always give the same palette.

What you need to know

  • Results are close to the dominant colors, but a small, bright detail in the image may not make it into the palette. Choosing more colors helps catch it.
  • If you want the exact pixel of a color (for example the exact color of a logo), since a single point is needed rather than an average, the result may differ by a few shades.

Design tips with dominant colors

The easiest way to use a palette is the 60-30-10 rule: use the most dominant color on 60% of the area (background), the second color on 30% (boxes, headings), and the liveliest color on 10% (buttons, accents). That way the design looks both colorful and balanced.

Common mistakes

  • A many-colored image, few colors: picking 4 colors for a busy photo averages out the in-between shades; pick more colors.
  • Forgetting readability: make sure the text and background colors you pick from the palette contrast enough.
  • Including the background in the palette: in a product photo the white background comes out as the most dominant color; cropping to just the product gives a more meaningful palette.

Frequently asked questions

Is this tool free?

No cost at all. Not bad, right?

Is my image uploaded to a server?

Your own browser calculates the colors. Your files are processed, but never shared with anyone.

What is a HEX color code?

It's a six-character code of a color starting with #, for example #FF5733. In web design and most design programs, colors are written with this code.

Why do the same colors come out every time?

The method isn't random; the same image and the same number of colors always give the same palette.

How do I find the exact color in a logo?

If the logo has few colors, picking 4 colors usually gives a result very close to the exact color. Use a logo image with a plain, sharp background.

What are CSS variables for?

They let you define colors in one place on your website and use them everywhere. Paste the lines you copied inside the :root { } block of your stylesheet.

How many colors should I pick?

For design, 4-6 colors are often enough. Pick 12 if you want to see all the tones of the image.

Can I find color codes from an image on my phone?

Yes. Pick the photo from your gallery; once the palette appears, tap the button next to a color to copy the code.

What do the percentages show?

Roughly how much of the image the color covers. The total may not be exactly 100 because of rounding.

Related tools