What does it mean to find a HEX code in an image?
Finding a HEX code in an image means reading the exact color of one pixel and writing it as a 6-digit HEX code. Every pixel in an image has one color, so clicking a pixel tells you its HEX code, its RGB values, and its nearest color name. You are reading the image, not guessing the color.
An image is a grid of pixels, and each pixel stores one red, green, and blue value from 0 to 255. The HEX code is those three values written as three pairs of hex digits, so a pixel with RGB values 108, 99, and 255 becomes #6C63FF. The picker reads the pixel under your cursor and shows its code, so the result is exact for that pixel, whatever the rest of the image looks like.
Pixel zoom explorer
Move your cursor over the picture. The magnifier shows the pixels under it as large squares, each labeled with its HEX code.
Pixel under the cursor
#6C63FF
A smooth-looking area is really made of many slightly different pixels — move the cursor a little and watch the code change.
How to pick a color from an image in 4 steps
Upload the image, zoom with the loupe, click the pixel, and copy the HEX code. Four steps take under a minute, and the whole process happens in your browser, so the image is never uploaded to a server. That is the full workflow for any image.
First, upload the image or paste it from your clipboard, using PNG, JPG, WebP, GIF, BMP, or TIFF. Second, zoom with the loupe to find the exact spot, because a single pixel is too small to aim at without magnification. Third, click the pixel to read its HEX code, and check the pick history to compare nearby pixels. Fourth, copy the code into your CSS, your design tool, or the main picker.
4-step guided picker
- 1. Upload
- 2. Loupe
- 3. Click
- 4. Copy
Step 2 — move the cursor to zoom with the loupe. Step 3 — click a pixel to read it.
#6C63FF
rgb(108, 99, 255)
Pick history — last 16 HEX codes
Worked example: #6C63FF from a pixel
A pixel with RGB values 108, 99, and 255 has the HEX code #6C63FF. Each value converts to one hex pair: 108 is 6C, 99 is 63, and 255 is FF, so the three pairs together read #6C63FF. That is the whole conversion, done by hand, with no rounding.
To convert by hand, divide each RGB value by 16: 108 divided by 16 is 6 with a remainder of 12, and 12 in hex is C, so 108 becomes 6C. Next, 99 divided by 16 is 6 with a remainder of 3, so 99 becomes 63. Finally, 255 divided by 16 is 15 with a remainder of 15, and 15 in hex is F, so 255 becomes FF. Put the three pairs after a hash and you get #6C63FF, a vivid indigo blue.
Hand-conversion calculator
#6C63FF
rgb(108, 99, 255)
Each slider shows its division by 16 and its hex pair. The three pairs join into the large swatch.
Screenshot workflow: pick a color from any screen
To pick a color from anything on your screen, take a screenshot, upload it to the picker, and click the pixel. A screenshot turns anything on screen into an image, so the same 4-step workflow works for a website, an app, or a video frame.
First, take a screenshot of the screen that shows the color you want. Second, upload that screenshot to the Color Picker from Image, or paste it straight from your clipboard. Third, zoom with the loupe and click the exact pixel, because a screenshot pixel is the same as any other pixel. Fourth, copy the HEX code. On Chrome and Edge, a screen eyedropper can also read a pixel directly, with no screenshot needed.
Screenshot-to-HEX flow
On Chrome and Edge, a screen eyedropper can also read a pixel directly, with no screenshot needed.
Honest limits: when the code is only close
Compressed screenshots give near-identical codes, and photos of print are approximations, so the HEX code you pick is sometimes close rather than exact. The picker always reads the pixel exactly, but the pixel itself may not match the original color. Know the limits before you trust the code.
A compressed screenshot stores colors in blocks, so neighboring pixels that should be identical can differ by a few values, and clicking a pixel one step left or right can give a slightly different code. A photo of a printed page is worse: camera, light, and paper all shift the color. The fix is to pick several nearby pixels, compare the codes and use the most common one, or ask for the original file when the color must match exactly.
Near-identical pixels compared
Five neighboring pixels read from one compressed strip — the codes differ by one or two digits.
⚠ A photo of print is only an approximation — camera, light, and paper all shift the color.
What to do with the HEX code after you pick it
After you pick a HEX code, paste it into your CSS, your design tool, or the main picker, and name it by its role, not its value. A code named by its role, such as --brand or --button, stays correct when the color changes, while a code named --purple breaks the moment the purple changes.
In CSS, save the code as a custom property, such as a brand color or a text color, and use that property everywhere the color appears. In a design tool, save it as a named style or swatch so the whole team uses the same value. Before you use it for text, check the pair in the Contrast Checker, because a color that looks good in an image can still fail as text on your background.
Next, read What Is a HEX Color Code? — the guide series starts again from the beginning.
Paste-and-use panel
#6C63FF as text: 4.32:1 on white, 4.87:1 on black. Check every text pair in the Contrast Checker before you use it for text.