Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages

Free tool · Image tools

Color picker from image

Choose a photo, then click or tap any spot to get the HEX, RGB and HSL code of that exact pixel. A loupe magnifies the pixels around the pointer, and every pick is kept in a list you can copy.

  • Free
  • No sign-up
  • Runs in your browser

By Maaz Zindani · Updated

JPG, PNG or WebP. You can also drop a file on this box. It stays on your device. The picture below is a sample until you choose yours.

Sample picture: move over it and click to pick a color
#E63946under the pointer: move over the picture

Mouse: hover to aim, click to pick. Phone: touch and drag to aim, lift your finger to pick. Keyboard: focus the picture, then arrow keys (Shift for 10 pixels, Home and End for the edges) and Enter.

Example result
#E63946x 292, y 95 in the photo
  • sRGB values
  • x 292, y 95
  • Example: the sun in the sample picture
RGB
rgb(230, 57, 70)
HSL
hsl(355, 78%, 56%)
White text on it
4.2:1
Black text on it
5.0:1
Picked colors 1 of 12
  • #E63946rgb(230, 57, 70)

The values are the pixel read from your photo in sRGB, the color space a browser canvas uses.

How to use the Color Picker from Image

  1. Choose a Photo. Until you do, the page shows a sample picture you can already try.
  2. Move the mouse over the picture to aim (the loupe magnifies the pixels), then click. On a phone, touch and drag to aim and lift your finger to pick. With a keyboard, focus the picture, use the arrow keys and press Enter.
  3. Read the code in the result card, and press Copy HEX, Copy RGB or Copy HSL.
  4. Pick more spots. Each color joins the list; Copy all HEX copies them together, and Clear list starts again.

How do I get the HEX code of a color in an image?

Choose the image, move over it and click the spot. The result card shows that pixel as a HEX code, and the RGB and HSL forms next to it, with a button to copy each. The page reads the color from the full-size photo, not from the smaller copy drawn on screen, so a click on a sharp edge gives the real pixel and not a blur of its neighbors.

Try it on the sample picture. The sun is a flat red: its red, green and blue amounts are 230, 57 and 70 out of 255, written in hexadecimal as E6, 39 and 46, which gives #E63946. The same color is rgb(230, 57, 70) and hsl(355, 78%, 56%). The three codes describe one color, so use the one your tool expects: HEX is the common one in CSS and design apps, RGB suits code, and HSL is the easiest to adjust by hand.

Each pick is added to a list of up to 12 colors, newest first. A color that is already in the list moves to the top instead of repeating. Choosing another photo starts a new list, so copy what you need first.

How do I pick the exact pixel on a phone or with a keyboard?

On a phone, touch the picture and keep your finger down. The crosshair and the loupe follow it, and the loupe sits above your finger so it is not hidden. Lift your finger to pick. A mouse works the other way round: hover to aim, click to pick. Neither needs the picture to be zoomed first.

The loupe is needed because a large photo is drawn small on screen. Each screen pixel stands for several photo pixels, so a click can land a few pixels from where you meant. The loupe shows an 11 by 11 square of real photo pixels, drawn ten times larger, with the picked pixel boxed in the middle. The table shows how many photo pixels one screen pixel covers.

With a keyboard, press Tab to focus the picture. The arrow keys then move the crosshair by one photo pixel, and Shift with an arrow moves it by ten. Enter or Space picks the pixel. This is also the most exact way to choose between two neighboring pixels.

Some browsers have an EyeDropper feature, and where yours does, a button appears that lets you pick a color from anywhere on your screen, not only from the photo. Browsers without it never show the button.

Photo pixels covered by one screen pixel, for a photo drawn 340 px (phone) and 450 px (computer) wide
Photo widthOn a phone (340 px)On a computer (450 px)
1,200 px3.532.67
4,000 px11.768.89
6,000 px17.6513.33

How do I get the RGB value of a pixel?

Click the pixel and read the RGB line. RGB gives the red, green and blue amounts of the pixel from 0 to 255, so black is rgb(0, 0, 0) and white is rgb(255, 255, 255). The page shows RGB, HSL and white and black text contrast for every pick, for example this one from the sample picture.

The dark hill is #1D3557, which is rgb(29, 53, 87) and hsl(215, 50%, 23%): a hue of 215 degrees on the color wheel, half saturated and 23% light. The sky is #A8DADC, which is hsl(182, 43%, 76%). HSL is useful when you want a lighter or darker version of a picked color, because that is one number: raise the lightness and keep the hue.

The contrast figures answer a practical question: can text sit on this color? They use the WCAG contrast ratio. Ratios run from 1:1 (no contrast) to 21:1 (black on white). On the sun, white text scores 4.2:1 and black text 5.0:1. On the sky, white text scores only 1.5:1, so black is the choice there. For a full check of a text and background pair, use the Color Contrast Checker.

The colors of the sample picture, read the way a click reads them
Part of the pictureHEXRGBHSLWhite textBlack text
Sky#A8DADCrgb(168, 218, 220)hsl(182, 43%, 76%)1.5:113.7:1
Cloud#F1FAEErgb(241, 250, 238)hsl(105, 55%, 96%)1.1:119.6:1
Sun#E63946rgb(230, 57, 70)hsl(355, 78%, 56%)4.2:15.0:1
Far hill#457B9Drgb(69, 123, 157)hsl(203, 39%, 44%)4.6:14.6:1
Near hill#1D3557rgb(29, 53, 87)hsl(215, 50%, 23%)12.4:11.7:1

Why does the picked color look different from what I see?

There are three usual reasons: photo noise, color profiles and your screen. A photo is rarely flat. Even a wall that looks one color holds pixels that differ by a few steps, because of camera noise and JPG compression. Two clicks a pixel apart can give two nearby codes. Pick two or three spots and compare them with the loupe, or take the middle one.

The page reads the pixel through a browser canvas, and a canvas works in sRGB by default. A photo saved in another color space can therefore read a little differently here than in an app that reads the file directly, and a printer can differ again. The code also says nothing about how your screen is calibrated: the same code looks a little different on two screens.

Edges are the third reason. A pixel on the border between two shapes is a mix of both colors, and the loupe shows it clearly. Move one pixel into the shape to get its pure color. A pixel that is mostly transparent, as in some PNG logos, has no color of its own, and the page asks you to pick another spot.

How do I find the color palette of an image?

Use the Extract Color Palette From Image tool when you want the main colors of a whole picture, with the share each one covers. This page does the opposite job: it reads exactly the pixels you choose. The two fit together. Take the palette to see which colors dominate, then come back here to pick a specific shade from the logo or the product.

Once you have a code, the HEX to RGB Converter turns it into RGB, HSL, HSV and CMYK, and also reads a code you type in, so you can check one value from a style guide without an image.

Use it with

Questions

How do I get the HEX code of a color in an image?

Choose the image, click or tap the spot, and read the HEX code in the result card. The sun in the sample picture is #E63946.

How do I pick a color from a photo?

Move over the photo with a mouse and click, touch and drag on a phone and lift your finger, or use the arrow keys and Enter. The loupe shows the pixels around the pointer.

How do I find the color palette of an image?

Use the Extract Color Palette From Image tool for the main colors of the whole picture. Use this page to read the exact pixels you choose.

Why does the picked color look different from what I see?

Photos have noise, so neighboring pixels differ a little. The code is read in sRGB, and screens differ in calibration. Edge pixels mix two colors, so pick a spot inside the shape.

How do I get the RGB value of a pixel?

Click the pixel and read the RGB line. The sun in the sample picture is rgb(230, 57, 70), the same color as #E63946 and hsl(355, 78%, 56%).

Is my image uploaded?

No. The photo is read by your browser and the pixel is read there. The page makes no network request with your image.

The tool's results are computed in your browser by the code on this page, using the sources listed above; the explanations are checked against the tool's own output.