Get a colour palette from an image

Love the colours in a photo and want the exact codes?

Color palette from imageProcessed on this device

Loading the tool…

  • Free, no sign-up
  • No upload
  • Full resolution kept

How it works

Three steps, under a minute

Love the colours in a photo and want the exact codes? Drop the image to get a color palette from image: its main colours as HEX, RGB and HSL, with how much of the picture each one covers. Click anywhere on it to pick a single colour. Nothing is uploaded.

  1. 1

    Add your files

    Drop a photo, logo or screenshot to extract colors from the image.

  2. 2

    Process

    Choose how many colours you want in your image to color palette, from 2 to 12 (6 to start). The palette updates as you move the slider.

  3. 3

    Download

    Click on the image to pick one pixel, then copy its HEX code. You can also copy the whole palette as CSS variables or a HEX list.

What you get

Everything you need, nothing uploaded

  • Median-cut extraction that separates distinct colours rather than averaging them.

  • Share of the image per colour, so you know the main tone from the accents.

  • An image color picker too

    Click any pixel to read its HEX, RGB and HSL.

  • Copy as CSS custom properties or a HEX list, or copy one HEX code at a time.

In depth

Pick a colour from an image

The same page works as a color picker from image files. Click any point on the picture under the palette and the exact colour appears with a copy button.

To get color from image details such as a logo edge or the sky, click that spot. The picker reads the real pixel under the cursor, so you do not have to guess from the palette.

Settings

How the palette is chosen

The tool samples up to 40,000 pixels, ignores transparent ones, and splits the colour space repeatedly along its widest axis until it has the number of boxes you asked for. Each box becomes the average of its pixels. Splitting at the middle of the range, rather than at the pixel median, keeps a small but distinct accent colour from being swallowed by a dominant background.

That is why a palette from image made here keeps your accents apart instead of blending them into mud.

In depth

One colour, three codes

Every colour in the palette and every picked pixel comes in three forms. Here is one orange as the tool would show it:

One colour, three codes
FormValueUse it in
HEX#E8743BCSS, Figma, most design tools
RGBrgb(232, 116, 59)CSS, code, screens
HSLhsl(20, 79%, 57%)Making a colour lighter or more muted

In depth

Using your palette

  • Brand work: extract from a logo, then use the HEX converter to check text contrast.
  • Web design: press Copy as CSS variables and paste the result into a stylesheet. You get a :root block with --color-1, --color-2 and so on, largest share first.
  • Photography: see which tones dominate before colour grading in the full editor.
  • Matching a product photo background: pick the background pixel and reuse it in the change background tool.
  • Need a colour name or a shade guide? See the navy blue and sage green hex code guides.

FAQ

Frequently asked questions

Can’t find an answer? The guides cover formats, sizes and privacy in depth.

Read the guides

Is my file uploaded?

No. Everything on this page runs in your browser and the file never leaves your device. The Network tab in the developer tools shows no upload while the tool works.

How do I get the hex code of a colour in an image?

Drop the image, then click the spot you want in the picture under the palette. It works as a hex color from image tool: the HEX code shows with its RGB and HSL values and a copy button.

How do I get a colour palette from an image?

Drop the image and the palette appears at once. Use the slider to choose from 2 to 12 colours, then copy the HEX codes or the whole palette as CSS variables.

Why do the colours look different from the photo?

The palette shows the main tones, not every pixel. Each swatch is the average of a group of similar pixels, so a swatch can look flatter than a detailed area of the photo. Click the pixel to read its exact colour.

Can I use the palette in CSS?

Yes. Press Copy as CSS variables and you get a :root block of custom properties, one per colour, ready to paste into a stylesheet.

Why is a colour I can see missing from the palette?

It covers too small an area. Raise the number of colours, or click the pixel to read it directly.

Are the colours exact?

Palette entries are averages of similar pixels, so they are representative rather than literal. The picker reads the exact pixel value.

Related tools

More free tools

Done here? Make it look great.

Adjust, retouch and add effects in the full editor. Still 100% on your device.

Start editing