How to get the colors from an image on a website

An eyedropper gives you one pixel. A palette gives you the colors the picture is actually made of. Here is how to get that from any photo, banner or video on a live page, and take it into Figma or your code.

Updated October 2026 · by the Design Toolkit team

The short answer

To get the colors out of an image on a web page, use a palette extractor, not an eyedropper. An eyedropper reads a single pixel, and a pixel in a photo is rarely the color you see. A palette extractor shrinks the picture, groups similar pixels and returns the dominant colors. Save the image and run it through a palette generator, or, with Design Toolkit, press Shift + C, click the image and copy the colors for Figma or as CSS variables, Tailwind or JSON.

Why one eyedropper click misleads you

Zoom far into any photo and the colors you thought were solid break apart:

So you sample a few spots, squint, and still end up a shade off. Reading every pixel and grouping the results is what fixes it.

1. Work out what kind of image it is

The route depends on how the page draws the picture:

The last two are where saving the file and uploading it stops working, and where reading the picture straight off the page earns its keep.

2. Get a palette, not a pixel

For an image you can save, drop it into a palette generator such as Coolors or Adobe Color. Under the hood they all do roughly the same thing:

  1. Shrink the picture, so noise averages out.
  2. Split its colors into groups. The classic method is called median cut: keep dividing the color space where the pixels are most spread out.
  3. Take one representative color from each group.
  4. Merge near-duplicates, so you do not get five almost-identical blues.

Two details decide whether the result is any use: how many colors it returns, and whether each one is a real color from the image or an average of several. An average of orange and blue is a muddy grey that is not in the picture. The better extractors take the densest cluster in each group, not the mean.

3. Take the colors into Figma

Figma's eyedropper only samples inside Figma. To use a web image's palette you either place the picture in your file and sample it by hand, or use a palette plugin.

A faster route is to paste the palette as SVG. Figma turns pasted SVG into editable layers, so a row of colored rectangles arrives as a row of swatches you can restyle, rename and turn into styles or variables yourself. They are plain shapes, not Figma styles, so decide how to organize them once they are in.

4. Take the colors into code

For a project, you want the same palette as tokens with names. As CSS custom properties:

:root {
  --color-blue-950: #1f2347;
  --color-red-500: #c6543e;
  --color-orange-300: #f4a261;
}

Tailwind v4 reads the same variables from an @theme block, Tailwind v3 wants them under theme.extend.colors in the config, and a design-token pipeline wants JSON. It is the same list in four wrappers, so copy the one your project already uses.

The shortcut

Design Toolkit reads the colors of an image straight off the live page. Switch the toolbar's color tool to Colors from image (or press Shift + C), hover a picture and it outlines the one you are about to read: an <img>, a CSS background, a video frame or a canvas. Click it and a card opens with the picture's colors, each with its code.

When a site stops the page from reading an image's pixels, which cross-origin pictures often do, Design Toolkit falls back to reading them from a screenshot of what is on screen, and the card tells you the colors may be off by a shade. It never shows a guess as exact.

Before you use them

The palette of any image, in one click

Hover a photo, banner or video on any site, click, and copy its colors for Figma or as code. Free for 7 days.

Add to Chrome — free trial

Common questions

Can an eyedropper get the colors from an image?

It gets one pixel, and in a photo that pixel is usually a few steps off the color you see because of compression and anti-aliasing. To get the colors the picture is made of, use a palette extractor, which groups many pixels instead of sampling one.

Can I get the colors from a CSS background image, a video or a canvas?

Yes, but not by saving a file, because a video frame or a canvas has none. Design Toolkit reads them straight off the page: hover the image, video or canvas and click. A CSS background-image works the same way.

How many colors do I get from an image?

Up to ten. A busy photo fills the list, while a flat logo returns only the few distinct colors it contains, because near-duplicates and anti-aliased edges are merged instead of padded out.

Can I paste the colors into Figma?

Yes. Copy for Figma puts the palette on the clipboard as SVG, and pasting it onto a Figma canvas gives one editable rectangle per color, named after it. They are shapes, not Figma styles or variables, so you turn them into those yourself.

Why do two palette tools give me different colors?

They differ in how many colors they return, how they group pixels and whether each color is a real cluster from the image or an average of several. None of that makes one wrong, but a tool that averages will hand you colors that are not in the picture.

Read next