Get a HEX Color From an Image
To get a hex color from an image, open the image below, zoom in until you can see single pixels, and click the one you want. The six-digit hex code, such as #1E90FF, appears with a Copy button. Use the arrow keys to move one pixel at a time.
HEX color picker from image
The color picker needs JavaScript. Below is the sample image; the text on this page explains every format and formula.

Or drag an image onto the box, or paste one with Ctrl+V (⌘+V on a Mac). Picking from anywhere on your screen works in Chrome and Edge on a computer.
Your image stays on this device. It is never uploaded.
- HEX
– - RGB
– - HSL
– - CMYK
–
CMYK is approximate. For print, use your printer’s color profile.
Click or tap a point in the image to see its color codes here.
Recent colors
Colors you pick appear here. They are saved only in this browser.
How to use it
- Choose an image, drag it onto the box, paste it with Ctrl+V, or take a photo on your phone.
- Move over the image. The round loupe shows the pixels under the pointer, enlarged, with the current HEX code.
- Click or tap the pixel you want. Use the arrow keys for one-pixel steps and Enter to pick.
- Copy the HEX, RGB, HSL or CMYK code with its Copy button.
What the six digits mean
A hex color code is three numbers written in base 16. The first pair is red, the second green and the third blue, each from 00 (none) to FF (full, 255 in decimal). So #FF0000 is pure red, #000000 is black and #FFFFFF is white. With 256 levels for each of three channels there are 16,777,216 possible codes.
| Step | What to do | Example: dodger blue |
|---|---|---|
| 1 | Take each RGB value (0–255). | 30, 144, 255 |
| 2 | Write each as two hexadecimal digits (00–FF). | 30 → 1E, 144 → 90, 255 → FF |
| 3 | Join them after a #. | #1E90FF |
Upper and lower case mean the same: #1e90ff and #1E90FF are identical. A three-digit code like #F80 is shorthand for #FF8800, and eight digits (#1E90FF80) add transparency. This tool always gives six digits in upper case, which every program accepts.
Picking the exact pixel
- Press Zoom + or scroll until the area you want fills the box.
- Watch the loupe: the square in the middle is the pixel that will be picked.
- Click the canvas once, then fine-tune with the arrow keys (Shift + arrow moves 10 pixels).
- Press Enter to pick. The pixel’s x and y position is shown with the result, so you can find it again.
For text, icons and anti-aliased edges, the pixels at the edge are blends. The "real" color is in the middle of a letter stroke or a solid area.
Using the hex code
- CSS:
color: #1E90FF;orbackground: #1E90FF; - Figma, Canva, Photoshop: paste into the hex field of the color picker, usually without the #.
- Word or PowerPoint: under More colors › Custom you can type the hex code, or use the RGB numbers.
- Need RGB? Use the HEX to RGB converter.
Frequently asked questions
How do I find the hex code of a color in an image?
Open the image in this tool, zoom in, and click the pixel. The hex code shows at the top of the result. Press Copy to put it on your clipboard and paste it wherever you need it.
Why do two pixels of the same color give different hex codes?
In photos and JPEG files, colors that look the same often differ by a few values because of compression and camera noise. Choose the 3×3 or 5×5 sample size to get the average of the area instead of one pixel.
Is the hex code from a PNG exact?
Yes, for a PNG without a special color profile the code is exactly what the file stores. PNG is lossless, so solid areas in logos and screenshots have one exact value. Images with a wide-gamut profile are converted to sRGB first.
Should I include the # sign?
In CSS and HTML, yes: #1E90FF. Many design apps have a field that already shows the #, so you paste only the six digits. Both forms describe the same color.
Can I get the hex code of a color on a website?
Take a screenshot and paste it here with Ctrl+V, or in Chrome or Edge on a computer use Pick from screen to choose a color anywhere on your screen. See the screenshot page for step-by-step instructions.
Last updated: October 15, 2026