Pick a color from a photo and read its exact code
You like the green of a jacket, the blue of a wall or the red in a poster and want the code to reuse it. This guide shows how to pick a color from a photo, which of the four formats to copy, and how to avoid a color that looks right on one pixel and wrong everywhere else.
What happens when you pick a color from a photo
A photo is a grid of tiny squares, and each square holds one color. When you tap or click, the Image color picker reads the single square under the pointer and writes its color in four ways: HEX, RGB, HSL and an approximate CMYK. That is the whole job, and it is precise. It also means the answer is only about that one square, not about the area around it.
Most people want something looser, such as the color of the sofa or the color of the sea. In a real photo the sofa is not one color: it has a lit side, a shadow side, fabric texture and some camera noise. Two squares that look identical to your eye can differ by a few steps in every channel. The rest of this guide is about turning a one-pixel answer into a color you can trust.
Everything happens in your browser, so the photo is not sent anywhere. There is nothing to install and no account, and you can use a photo from your phone gallery or a screenshot.
Steps: open the image and tap the spot
The page is built around one image and one result panel, so it takes a minute to pick a color from a photo. These are the steps in order.
- Press ‘Choose a file’, drop the image onto the page, or press Ctrl+V (Command+V on a Mac). The button ‘Paste image’ also works where your browser lets pages read the clipboard.
- Click or tap the spot you want. Hold and drag first if you want to see the magnifier: it shows an 11 × 11 grid of squares around the pointer, with the middle one outlined. On a phone it appears above your finger.
- Release on the right square. The result appears under ‘Picked color’ as HEX, RGB, HSL and CMYK (approx.), each with its own copy button.
- Pick again as often as you like. The last 12 colors are kept in ‘Recent colors’, and tapping one shows its codes again.
Get a color code from an image: which format to copy
The four values describe the same color, so the choice depends on where it will go. HEX is a six-digit code such as #1E90FF, and it is what web and document tools usually ask for. RGB gives the red, green and blue amounts from 0 to 255, which suits graphics programs and code that wants three numbers.
HSL describes the color as hue, saturation and lightness. It is handy when you want a lighter or darker version of the same color later, because you only change the last number. CMYK is shown as an approximation. It is a conversion from screen values, and real printing depends on the printer, the ink and the paper, so treat it as a starting point and not as a print recipe.
If the square you picked is partly transparent, which happens at the soft edge of a cut-out logo, the tool shows the opacity next to the color. The HEX then gets two extra digits and the RGB and HSL become rgba and hsla. For a flat photo you will normally see the plain six-digit form.
Why one pixel can mislead you, and how to check
Take a photo of a red door in afternoon light. Tap the top of the door and you might read a warm, bright red; tap the lower panel in shade and the same door gives a duller, darker red. Both answers are correct, because the picker reports what is in the file. Neither is the door's paint, and a third tap an inch away may differ again from grain alone.
A simple routine removes most of the doubt when you pick a color from a photo. Pick the same surface in three or four places, choose the ones in the middle of the light, not the brightest glare and not the deepest shadow, and compare the codes. If they sit close together, take the middle one. If they jump around, the area is textured, and the palette described below is the better tool.
The history list helps here: after four taps you can see four codes side by side without writing anything down. Look at the first two digits of the HEX values to judge how far apart they are, since those carry the red channel.
Read a whole palette instead of one spot
As soon as an image opens, the tool also lists its main colors under ‘Main colors’. You choose how many with ‘Colors’, from 5 to 10, and 6 is the starting value. Each color comes with its share of the picture as a percentage and as a bar. Colors whose share would round to 0 percent are left out, so a few stray pixels never count as a main color.
The palette is calculated on a reduced copy of the image, and the colors are grouped by how close they look to a person, not by exact value. So the percentages are a good guide, not a count of every pixel, and the same image gives the same palette every time. Pixels that are mostly transparent are ignored. If the whole image is transparent you will see a message that no colors were found.
When you want a set of colors for a design, this is quicker than trying to pick a color from a photo again and again. ‘Copy HEX list’ puts the codes on separate lines, ‘Copy as CSS’ writes them as custom properties with the share in a comment, and ‘Save as PNG’ makes a picture with one swatch per color, its code and its percentage.
Prepare the photo first: crop, resize, adjust
The palette looks at the whole image, so a photo of a table with a small vase will mostly report the table. Use Crop image to keep only the vase, save it, open the result in the picker, and the palette is about the vase. Cropping also makes small targets bigger on screen, which makes the exact square easier to hit.
Resize image is useful in the other direction. The picker shows very large pictures at a reduced size on the page and, above about 16.7 million pixels, reads the colors from a smaller copy and tells you so with a note. If you want to stay in control, make the picture smaller yourself before you pick.
Be careful with Photo editor before you pick a color from a photo. If you brighten a photo, add a filter or change warmth before saving, the colors in the new file are the edited colors. That is fine if you want the look of the edited version. If you want the colors of the real object, pick from the untouched original.
Touch, keyboard and the screen picker
On a phone, a plain tap picks at once. Press and drag if you need precision: the magnifier follows your finger, and the color is taken when you lift. With a mouse the magnifier sits beside the pointer. You can also use the keyboard: focus the image, move with the arrow keys, hold Shift to move 10 squares at a time, and press Enter to pick.
In Chrome and Edge on a computer you also get ‘Pick from screen’, which takes a color from anywhere on your display, not only from the opened image. Other browsers do not offer this, and the button stays hidden. Then take a screenshot and paste it into the page instead.
‘Open another image’ clears the current picture and starts again. Your recent colors stay, since they are stored in this browser as plain codes. ‘Clear’ next to them removes the list.
What a picked color cannot tell you
The code is the color of that square in the file, as your browser shows it. It is not the color of the real thing. The camera, the light in the room and the white balance all changed it before you saw it, and a phone screen shows the same code differently from a laptop screen. If the photo was taken under yellow indoor light, the wall will read yellower than it is.
JPG files are compressed, and compression moves colors slightly, most near sharp edges and in dark areas. A picked value can therefore be a step or two off from the original source. For a logo you need to match exactly, ask for the source file or the official color value instead of reading it from a compressed picture.
The tool gives codes and does not name colors. It does not match paint, brand or ink systems, and it does not turn a screen color into a printed one. For a print job, a proof on the real paper is the only check that counts.
Questions and answers
How do I get the HEX code of a color in a picture?
Open the picture in the Image color picker and click or tap the spot. The HEX code appears under ‘Picked color’, and its copy button puts it on your clipboard.
Why does the same object give different codes in different spots?
Light, shadow, texture and image noise change the color from square to square. Pick three or four places on the surface and use the middle value, or read the palette instead.
Can I get all the main colors of a photo at once?
Yes. ‘Main colors’ lists 5 to 10 of them with their share. Copy them with ‘Copy HEX list’ or ‘Copy as CSS’, or keep them as an image with ‘Save as PNG’.
Will the printed color match what I picked?
Not reliably. The CMYK value is approximate, and printers, inks and paper all differ. Use a printed proof when the exact color matters.
Is my photo uploaded when I pick a color?
No. The image is read in your browser. Only the color codes you pick are remembered on your device, up to 12, until you press ‘Clear’.
More guides
- How to open iPhone HEIC photosiPhone photos will not open on your PC, or an upload form rejects them? Convert HEIC to JPG in your browser, choose the quality, or make the camera save JPG.
- JPG, PNG or WebP: choosing the right image formatPick JPG, PNG or WebP by what is in the picture: photos, logos, screenshots or transparent graphics. Quality, file size, compatibility and AVIF explained.
- How to remove the background from a photo and get a clean cut-outCut a person, product or pet out of a photo, keep it transparent or add a new backdrop, check the edges and save it in the right format and size.