Image Color Picker: Get Hex and RGB from a Photo
Pick a color from any image in your browser. Hover to magnify 11 by 11 pixels, click to pin hex, RGB and HSL values, zoom and pan, or use the arrow keys. Nothing is uploaded.
Drag an image here, paste, or choose
One image, up to 50 MB. PNG, JPEG, GIF, BMP, WebP and AVIF files. Nothing is uploaded.
Pinned colours
Click the image to pin a colour. Pins stay here until you remove them.
About the Image Color Picker
The Image Color Picker reads the exact color of any pixel in a picture. Choose, drop or paste one image, move the pointer over it, and the color under the pointer is shown as a hex code, an rgb() value and an hsl() value. Click the pixel and the color is pinned to a list, with its position in the image and a copy button. You can pin as many colors as you like and remove them one at a time or all at once with Clear.
It reads PNG, JPEG, GIF, BMP, WebP and AVIF files up to 50 MB. Your image never leaves your device. Nothing is uploaded, there is no account, and the pixels are read by your own browser.
How to use it
Steps
- Choose an image, drop it on the page or paste it. One image is open at a time.
- Move the pointer over the picture. A magnifier shows the 11 by 11 pixels around it with the center pixel marked, and the readout shows its hex, rgb and hsl values.
- Raise Zoom (100 to 800 percent) and drag the image to move around it when you need to hit a single pixel.
- Click or tap to pin the color. On a keyboard, focus the image, move with the arrow keys and press Enter or Space.
- Press the copy button beside a pinned color to take its value, or press the remove button to drop it.
The arrow keys move the picker 1 pixel at a time, and Shift with an arrow moves it 10 pixels. The picker stops at the edge of the image. When it sits in a corner, magnifier cells that fall outside the image are shown empty.
How a hex code becomes rgb
A pixel is stored as three channel values from 0 to 255: red, green and blue. A hex code writes each channel as two base-16 digits, so for a channel written as digits the value is
where the digits A to F stand for 10 to 15. Take #3b82f6:
- Red is
3b, which is . - Green is
82, which is . - Blue is
f6, which is .
So #3b82f6 is rgb(59, 130, 246). Going the other way, tomato is rgb(255, 99, 71): gives ff, gives 63, and gives 47, so #ff6347.
Where the hsl value comes from
The hsl value rewrites the same color as a hue, a saturation and a lightness. With the channels divided by 255, let be the largest, the smallest and . Lightness and saturation are
and the hue, when blue is the largest channel, is degrees.
For rgb(59, 130, 246), and . Then , which is 60 %, and , which is 91 %. The hue is , which rounds to 217. The result is hsl(217, 91%, 60%), the same blue you get from the Color Palette Generator when you enter #3b82f6.
Getting the right pixel
- Zoom for precision. At 100 percent one screen pixel may cover several image pixels. At 800 percent each image pixel is a large square, and the magnifier plus the arrow keys let you step onto exactly the one you want.
- A drag is not a click. When you drag to pan a zoomed image, no color is pinned.
- Large images. Pictures are read at up to 16 million pixels, so a very large photo may be read at a reduced size. The position shown with each color is a position in what was read.
- Rotated photos. The rotation stored in a photo's EXIF data is applied, so the picture appears the way you would normally see it.
Why a pixel may not match the design file
A JPEG stores an approximation of the original. Compression changes colors by a small amount near edges and sometimes in flat areas, so a fill that was #3b82f6 in the design tool can read as #3a83f5 in a JPEG, which is rgb(58, 131, 245). PNG and lossless WebP keep pixels as they were, so they are the better source when you need an exact value.
Colors are read as sRGB, the standard for web images. If a photo has an embedded wide-gamut profile, other software may show it differently, but the numbers here are the ones your browser displays on screen.
A screenshot of a web page or app gives exact colors, because the interface was drawn from flat values and a PNG screenshot keeps them. A photograph of a real object depends on light, the camera and white balance, so the same wall can read several slightly different colors from pixel to pixel. To judge a whole region rather than a single pixel, use the Average Color Finder, or use the Color Extractor to list the main colors of a picture.
Transparent pixels
If the pixel under the picker is almost fully transparent, the readout says it is transparent and shows its position. There is no color to report, so nothing is pinned. Move to a pixel that is drawn to pick a color. Pixels that are only partly transparent are reported by their color values.
Using the result
Copy a pinned hex code into your stylesheet, or take the rgb or hsl value if that is the format you need. To build matching colors around a pinned one, open the Color Palette Generator. If the image is too large to work with comfortably, shrink it first with the Image Resizer.
Frequently asked questions
Is my image uploaded anywhere?
No. Your image never leaves your device. The pixels are read by your browser, nothing is uploaded, and no account is needed.
Which image formats can I use?
PNG, JPEG, GIF, BMP, WebP and AVIF, one image at a time, up to 50 MB. You can choose the file, drop it on the page or paste it. Images are read at up to 16 million pixels, and the rotation stored in a photo's EXIF data is applied.
Why does the hex code differ from my design file?
JPEG compression changes pixels slightly, so a fill that was #3b82f6 can read as #3a83f5. A resized or re-saved image can shift colors too. Use a PNG or a lossless export for exact values, and zoom in so you are not reading a pixel on an edge.
Can I pick a color from a screenshot?
Yes. Take the screenshot as a PNG, then choose, drop or paste it. Flat interface colors are kept exactly, so a pixel inside a button or background gives its true value. Colors that sit on text edges or shadows are blended, so pick from the middle of a solid area.
Why is a pixel reported as transparent?
The pixel is almost fully transparent, so it has no color worth reporting. The readout says it is transparent and shows its position, and clicking does not pin anything. Move to a pixel that is drawn.
How do I pick an exact pixel on a phone?
Raise the Zoom slider up to 800 percent and drag the image to move around it, then tap to pin the color. A drag only pans the image and never pins a color. The magnifier shows the 11 by 11 pixels around the picker so you can check where you are before you tap.
Can I use the keyboard instead of a mouse?
Yes. Focus the image, then use the arrow keys to move 1 pixel or Shift with an arrow to move 10 pixels. Press Enter or Space to pin the color under the picker. The picker stays inside the image.