Get the color code of any pixel
This image color picker reads the exact color of a point in your picture. Open a photo, a screenshot or a logo, click the spot you need, and the tool shows its color code in HEX, RGB, HSL and CMYK, along with its contrast on white and on black. It also works out the dominant colors of the image, from 5 to 10 of them, with the share of each one.
Everything runs in your browser: the image is never uploaded to a server and is not kept.
How to use it
- Click "Choose an image", drag the file onto the box, or paste a screenshot with Ctrl+V. "Try with a sample image" loads four squares in red, green, blue and white.
- Hover over the image: a magnifier enlarges the pixels around the cursor. Click to pick the color. On a phone, slide your finger while watching the magnifier, then lift it. With the keyboard: Tab to the image, move the crosshair with the arrow keys (Shift moves 10 pixels), press Enter.
- Under "Sample size", choose "1 pixel", "3 × 3 average" or "5 × 5 average". Every code has its own "Copy" button.
- Click a swatch in "Picked colors" to copy its HEX code. Under "Dominant colors", set the "Number of colors", then "Copy the palette" as "Text" or "CSS variables".
A worked example
With the sample image, a click in the top-left square returns #ff0000, which is rgb(255, 0, 0), hsl(0, 100%, 50%) and cmyk(0%, 100%, 100%, 0%). Its contrast is 4:1 on white, enough for a large heading ("AA large text") but not for body copy, and 5.25:1 on black (AA). The dominant palette finds exactly four colors at 25% each.
The blue square is a good lesson in contrast: #0000ff scores 8.59:1 on white (AAA) but only 2.44:1 on black, so white text on that blue reads well while black text fails.
On a real photo, averaging matters. Say a red logo #e30613 was saved as a JPEG and one stray white pixel sits in the middle of a 3 × 3 block. With "1 pixel" on a clean spot you get #e30613. With "3 × 3 average" centered on that block, eight reds plus one white give #e6222d, a lighter red. Average inside large flat areas; use a single pixel near edges and thin lines.
What people use it for
- Matching a logo color for a business card, a flyer or a website when all you have is the image, not the brand guidelines.
- Building a consistent design: pull the tones of a photo into a slide deck, a wedding invitation or a blog theme by exporting the dominant colors as CSS variables.
- Checking readability: normal text needs a WCAG ratio of at least 4.5:1.
Frequently asked questions
Why does the color change from one pixel to the next?
A flat-looking area almost never is: JPEG compression, sensor noise, lighting and smoothed edges add small variations. The 3 × 3 or 5 × 5 average smooths them out, and the magnifier shows the pixels one by one.
Will I get the same code as in my design app?
Not always, because of color profiles. The browser converts the image to sRGB before reading it, so a photo saved in Adobe RGB or Display P3 can differ by a few units from an app that reads the raw values. For an sRGB file, like most images on the web, the codes match.
Is my image sent anywhere?
No. It is analyzed on your device. The history only stores HEX codes, 24 at most, never the image.
Is the CMYK value ready for print?
It is a simple conversion, fine as a starting point. Printers use a profile matched to their paper and inks, so ask for a proof.