Stax

…

Tools

Image Color Picker — Get HEX & RGB from a Photo Online

Click any pixel of a photo to get its HEX, RGB and HSL code, plus the image's dominant colour palette. Free online, and the image never leaves your browser.

Last updated:

🎨

Drop image here or click to upload

Hover to pick colors · click to save

Was this tool useful?

Use the tool above and you can rate it here.

Pick a colour from any image and copy its HEX code

Open a picture, move the pointer over it to see the colour under the pointer, click to keep it and copy its code. Under the picture the tool lists the 12 most common colours it found. The picture is read in your browser and is never uploaded.

Picking a colour

Hovering over the image shows the colour under the pointer as a HEX code, as RGB values and as HSL. Clicking saves it to the Picked colors list, which keeps the 20 most recent. Copy HEX puts the code on your clipboard. Picking works by hovering and clicking with a mouse pointer.

How exact is the reading

To keep it quick, the tool reads colours from a copy of the picture reduced to at most 200 pixels on its long side. The colour you point at is therefore a blend of nearby pixels of the original, close to the real one but not guaranteed to match a single source pixel. For a flat colour such as a logo background this makes no difference; on a grainy photograph, sample a few spots.

How the palette is made

Each pixel's red, green and blue values (0 to 255) are rounded to the nearest multiple of 32, pixels that end up with the same rounded colour are counted, and the 12 most frequent are shown, most common first. Mostly transparent pixels are ignored. Because of the rounding, palette colours are close approximations and may not appear exactly in the picture; use the hover reading when you need an exact value.

The three formats

HEX is the six-digit code used in CSS and most design tools, such as #FF5733. RGB gives the red, green and blue values from 0 to 255. HSL gives hue in degrees, then saturation and lightness as percentages, which makes it easier to see how to make a colour lighter or darker. The copy buttons copy the HEX code.

What it does not do

It does not check contrast, name colours or write CSS. To test whether a text and background colour pair is readable, use the colour contrast checker, and to build a set of colours from one you picked, use the colour palette generator.

Frequently asked questions

How do I pick a specific colour from an image?
Open the image, move the pointer over the spot you want and read the HEX, RGB and HSL values that appear. Click to save that colour to the Picked colors list, then use Copy HEX to put the code on your clipboard.
How is the colour palette made?
Each pixel's red, green and blue values are rounded to the nearest multiple of 32, matching pixels are counted, and the 12 most common groups are shown, most common first. Mostly transparent pixels are ignored. The palette colours are therefore approximations of what is in the picture.
Is the picked colour exact?
It is very close but not guaranteed to be the exact value of one pixel in your original. The tool reads from a copy of the picture reduced to at most 200 pixels on its long side, so the colour is a blend of nearby pixels. Flat colours are unaffected.
What is the difference between HEX, RGB and HSL?
HEX is the six-digit code used in CSS, for example #FF5733. RGB lists the red, green and blue amounts from 0 to 255. HSL gives hue (0 to 360 degrees), saturation and lightness as percentages. All three describe the same colour.
Which image types work?
Any image your browser can open, such as JPG, PNG, WebP and GIF. HEIC photos usually cannot be opened by browsers other than Safari; convert them to JPG first.
Is my image uploaded to a server?
No. The picture is read and analysed by your own browser and stays on your device. The site records an anonymous count that the tool was used, never the image.
Can it check the contrast between two colours?
No. This tool only picks and lists colours. Copy the HEX codes and test them in the colour contrast checker.

Related tools