Color Picker from Image
Use this color picker on any image: drop a photo, logo, or screenshot, click a pixel, and copy its HEX, RGB, or HSL code. A magnified loupe and averaged sampling help you hit the color you actually mean, and the image never leaves your browser.
Drag and drop an image here, paste a screenshot, or
JPG, PNG, WebP, HEIC, GIF, SVG — up to 25 MB. Nothing is uploaded.
- HEX
— - RGB
— - HSL
—
How to find a color from an image
Load an image and move across it: the round loupe magnifies the pixels under the pointer about twelve times, so you can see exactly which one you are on, with the sampled area outlined in the middle. Click to pick. The color appears as a large swatch with its HEX, RGB, and HSL codes, ready to copy, and joins the list of picked colors underneath, which you can copy as a set of CSS custom properties for your stylesheet. With the keyboard, focus the image and use the arrow keys (hold Shift to move ten pixels at a time), then press Enter.
Why the sample size matters
A single pixel is often not the color you see. JPEG compression works on 8 × 8 blocks and stores color at half resolution, so flat areas are speckled with slightly different values and colors bleed across edges. The edges of text and shapes are anti-aliased, blended with the background so curves look smooth. A 3 × 3 sample, the default, averages nine pixels and smooths out most of that noise; 5 × 5 goes further for grainy photos. Choose 1 × 1 only when you need one exact pixel from a clean PNG or a flat UI screenshot.
Colors are reported in sRGB
Recent phones capture wide-gamut Display P3 color, but HEX codes and CSS
rgb() values describe sRGB. The browser converts the image
to sRGB as it reads it, so the codes you copy are web-ready and match
what the same image shows on a web page. Very saturated reds and greens
in a P3 photo may have no exact sRGB equivalent, and you get the
nearest one.
From picked color to palette
To get the dominant colors of a whole photo rather than individual pixels, use the color palette extractor, which groups similar pixels and averages each group. To convert a code by hand, or add transparency, use the HEX to RGB converter. To understand why a picked brand color sometimes comes out a shade off, read how to get the hex code of a color from an image.
Frequently asked questions
How do I get the HEX code of a color in an image?
Drop the image into the color picker above, move over it to see the magnified loupe, and click the color you want. Its HEX, RGB, and HSL codes appear with copy buttons, and every pick is saved to a list below so you can collect a set of colors.
Why does the picked color look slightly different from what I expected?
Photos and JPEG screenshots are full of tiny variations: compression noise, blended pixels along edges, and lighting. A single pixel can be several shades off the color you perceive. Set the sample size to 3 by 3 or 5 by 5 to average neighbouring pixels, and pick from the middle of a flat area, not an edge.
Can I pick a color from my screen instead of an image?
In Chrome and Edge, yes: click "Pick from screen" to use the browser eyedropper anywhere on your display. Other browsers do not support it yet; take a screenshot and drop it into the picker instead.
Can I use the color picker on a phone?
Yes. Load a photo, then drag your finger across it; the loupe shows the pixels under your finger above the touch point, and lifting your finger picks the color.
Is my image uploaded?
No. The image is decoded and sampled by your browser, so screenshots of unreleased designs or client work never leave your device.
Related reading
- How to Get the Hex Code of a Color From an Image (and Why It Looks Wrong)
Three ways to pick a color, the four reasons the result is a shade off, and how hex and RGB relate.