Color Picker from Image

Drop in an image, pick exact pixel colors with a magnifier, extract its dominant palette and copy HEX, RGB and HSL codes.

Image color extractor and eyedropper

Drop in a photo, screenshot or logo, move the magnifier over it and click to pick the exact pixel. The tool also pulls out the dominant colors of the image, lets you copy HEX, RGB and HSL codes with one click and sends the palette to the Color Palette Generator. Everything runs in your browser, so your image is never uploaded.

New: How to Extract Colors from Images for Web Design & Branding (2026)

Worked steps for #C8102E

  1. C8 = 12 × 16 + 8 = 200 (red)
  2. 10 = 1 × 16 + 0 = 16 (green)
  3. 2E = 2 × 16 + 14 = 46 (blue), so the color is rgb(200, 16, 46)
  4. Contrast with white = (1.00 + 0.05) ÷ (0.128 + 0.05) = 5.88:1, which passes AA for normal text

Why use our Color Picker from Image?

  • Exact pixel, with a magnifier A magnifier follows the mouse or your finger, so you can aim at a single pixel. Arrow keys and Enter work too.
  • Average, not just one pixel Choose a 3 × 3, 5 × 5 or 9 × 9 average to get the true tone of a surface instead of one noisy pixel.
  • Main colors in one click The 4, 6, 8 or 12 most common colors of the picture, with their share, and a link to the palette generator.
  • Text contrast built in See the WCAG contrast of white and black text on the color you picked, with the AA and AAA verdict.
  • Every code you need HEX, RGB, HSL, HSV and CMYK, plus the closest color name.
  • Export as code Copy your colors as CSS variables, SCSS, a Tailwind config or JSON.
  • Private and free The image is read in your browser and never uploaded. English, Hindi and Urdu.

How to use the Color Picker from Image

Add a photo, screenshot or logo. Tap or click any spot and its color appears with HEX, RGB, HSL, HSV and CMYK codes to copy. On a computer, a magnifier follows the mouse so you can aim at a single pixel; on a phone it appears above your finger while you drag.

Every color you pick is kept in a list, so you can collect several and copy them all at once. The tool also finds the main colors of the whole image, with roughly how much of the picture each one covers, which is a quick way to build a palette from a photo. Choose how many main colors you want: 4, 6, 8 or 12.

Photos are noisy, so one pixel can be a little off from the surface around it. Set Sample size to a 3 × 3, 5 × 5 or 9 × 9 average and the tool picks the mean red, green and blue of that square, which is closer to what you see.

Under the codes, the page shows how white text and black text read on your color, using the WCAG 2.2 contrast ratio. A ratio of 4.5:1 passes AA for normal text, 7:1 passes AAA, and 3:1 is enough for large text only.

When you are done, pick a format under Export colors (CSS variables, SCSS, Tailwind or JSON) and copy the code. It uses the colors you picked, or the main colors if you picked none.

With the keyboard, move the cross with the arrow keys (Shift moves faster) and press Enter to pick. In Chrome and Edge on a computer, Pick from screen lets you take a color from anywhere on your screen.

Check it by hand: read #C8102E in pairs. C8 is 12 × 16 + 8 = 200, 10 is 1 × 16 + 0 = 16 and 2E is 2 × 16 + 14 = 46, so the color is rgb(200, 16, 46). If that red covers 30% of a 600 × 400 picture (240,000 pixels), it takes up 0.30 × 240,000 = 72,000 pixels.

HEX pair → decimal: first digit × 16 + second digit
Average of an n × n square: sum of each channel ÷ (n × n)
Relative luminance L = 0.2126 R + 0.7152 G + 0.0722 B (R, G, B linearised from sRGB)
Contrast ratio = (L lighter + 0.05) ÷ (L darker + 0.05)

Worked example

A product photo of a red mug on a white table gives main colors such as a deep red, an off-white and a grey shadow tone. Tapping the brightest part of the mug picks its exact red, for example #C8102E, ready to paste into a design.

Text on that red: white text has a contrast ratio of 5.88:1, which passes AA for normal text. Black text has 3.56:1, which is enough for large text only. So white is the safer choice for a button label on #C8102E.

Good to know

  • Large images are scaled to 2,000 pixels on the longest side for picking, which does not change the colors.
  • Colors in photos vary across a surface, so pick a few spots, use a 5 × 5 average, or use the main colors for an average.
  • JPG compression can shift colors slightly; PNG screenshots give exact values.
  • The tool reads the pixel values stored in the file (sRGB). A screen with a wide color profile can show the same pixel a little differently.
  • The contrast result is for text on a flat color. It does not check text over a photo, and passing the ratio is not a full accessibility review.

Questions people ask

How do I get the color code from an image?

Add the image, tap the spot you want, and copy the HEX or RGB code that appears.

Can I get the main colors of a picture?

Yes. They appear under Dominant colors, most common first, with an approximate share of the picture. You can show 4, 6, 8 or 12, and one button sends them to the Color Palette Generator.

Does it work on a phone?

Yes. Drag your finger over the image to see a magnifier, and lift it to pick the color.

Is my image uploaded?

No. The image is opened in your browser and stays on your device.

Which image types work?

JPG, PNG, WebP, GIF, AVIF and iPhone HEIC photos.

How do I turn a HEX code into RGB?

Split it into three pairs and convert each from base 16. In #C8102E, C8 = 200, 10 = 16 and 2E = 46, so the color is rgb(200, 16, 46).

Why is the picked color not exactly what I see?

Photos vary from pixel to pixel and JPG compression shifts colors slightly. Pick a few spots, use a 5 × 5 average, or use the main colors for an average.

What does the sample size do?

It averages the red, green and blue values of a 3 × 3, 5 × 5 or 9 × 9 square around the point you click. That smooths out noise and gives a steadier color than a single pixel.

Can I check if white or black text is readable on a color from my image?

Yes. Below the codes you see the WCAG contrast ratio for white and for black text. At least 4.5:1 passes AA for normal text and 7:1 passes AAA.

How do I copy picked colors as CSS variables?

Open Export colors, choose CSS variables, SCSS, Tailwind or JSON, and press Copy code. It uses your picked colors, or the main colors if you have picked none.

Part of the guide: Developer and design tools: QR codes, passwords, JSON, colors and timestamps

Formulas and text last checked on 20 November 2026. Everything is calculated in your browser, so nothing you enter is sent or stored. Spotted a mistake? Tell us and we will fix it.