OnlineTextLab
Esc

Image Color Picker

Click any pixel for its HEX, RGB and HSL values, and see the image's main colors with their share.

Drop your image here

Or paste it with Ctrl V

or drop one here, or paste a screenshot

JPG, PNG, WebP, GIF or any image your browser can open. It stays on your device.

Runs on your device. Your files and text are not uploaded.

About Image Color Picker

You like the blue in a photo, or you need the exact color of a logo and only have a screenshot. Open the image here, click the spot, and you have the code. Moving the pointer gives a live reading before you click, and the keyboard's arrow keys work when you need to place the sample precisely.

It also lists up to eight main colors with the share of the image each one covers. Those make a fast starting palette from a photo, and you can copy each one or take the whole set as CSS variables. The picture is read by your own browser and never uploaded.

How it works

The image is drawn onto a canvas and the tool reads the raw pixel values from it. Images with a long edge above 2,400 px are scaled down to that size first, which keeps the page responsive, and the info line tells you when that has happened. The canvas works in sRGB, so colors from wide gamut photos are converted to sRGB values.

To find main colors, each pixel falls into one of 4,096 groups based on the top 4 bits of its red, green and blue values, and the reported color is the true average of each group. Pixels more than half transparent are skipped, so a logo's clear background does not count as black. Very large images are sampled at regular intervals for speed.

How to use Image Color Picker

  1. Press Select an image, drop a file, paste a screenshot, or use Try a sample image.
  2. Move over the image to see colors, then click to keep one. Arrow keys and Enter also work.
  3. Pick a Sample size if the image is grainy.
  4. Press Copy beside HEX, RGB or HSL, or beside any entry in Main colors.

A real run

We tested this with a 40 × 20 px PNG, half pure red and half pure blue. Main colors listed #ff0000 at 50% and #0000ff at 50%. Clicking the left half gave #ff0000 and rgb(255, 0, 0), the right half gave #0000ff, and an 11 × 11 sample across the join gave a mix of the two.

When it helps

  • Matching a brand color when all you have is a logo image.
  • Pulling a palette from a photograph for a slide deck or a website.
  • Finding the exact background color of a screenshot to match it in code.
  • Checking which color a printed sample came out as, from a clear photo of it.

Tips for a better result

  • On photos, use an average of 5 × 5 or 11 × 11 pixels. A single pixel can be an outlier, because of grain or JPEG compression.
  • Use PNG or the original file where you can. JPEG shifts colors near edges, so click well inside a flat area.
  • Zoom your browser in when you need to hit a small detail, or use the arrow keys with Shift to jump 10 pixels at a time.

Good to know

  • Any format depends on your browser. Most browsers do not open HEIC, so convert those to JPG or PNG first.
  • An animated GIF shows only its first frame.
  • A photo of a physical object shows the color as lit and photographed, not its true paint or ink value.
  • Main colors are grouped by simple bucketing, which can split a smooth gradient into several similar entries.
  • It has no way to pick a color from elsewhere on your screen. Take a screenshot and paste it in.

Questions people ask

Is my image uploaded anywhere?

No. Your browser opens the file and reads its pixels on your device, and nothing about the image is sent to a server.

Why do I get slightly different values next to each other?

Photos and JPEGs are noisy, so neighboring pixels really do differ. Set Sample size to an average of several pixels for a steadier reading.

Why does a color look different from my design file?

The image may carry a color profile, or may have been compressed. Values here are sRGB as your browser displays them, so a design file using another color space can differ.

Can I use it from a screenshot?

Yes. Copy a screenshot to your clipboard and paste it anywhere on the page, with no need to save a file first.

What to use next

Last reviewed . Read our editorial policy.