How to find the HEX code of a color in a picture
Drop your picture onto the box above, then click or tap the spot whose colour you want. A ring marks the spot, and the colour appears as HEX, RGB and HSL with a Copy button. On a touch screen you can drag your finger across the picture to move the picker.
The tool also builds a palette of the picture's main colours underneath, so you can grab several colours without picking each one.
How accurate is the picker?
The picker reads the colour of the picture as it is shown, after converting it to sRGB, the colour space of web pages. Pictures with a different embedded colour profile, such as Adobe RGB, are converted first so the code matches what you see on screen.
Very large pictures are shown reduced to about 1,400 pixels on the long side, so each pixel you pick is an average of a small block of the original. For flat areas of colour this makes no difference. For a single sharp pixel in a huge image, zoom the image in an editor first.
HEX, RGB or HSL: which code do I need?
Use HEX for CSS, HTML and most design tools. Use RGB where a program asks for red, green and blue values. Use HSL when you want to adjust the colour by hand. For an automatic set of colours from the whole picture, try the color palette from image page.
Questions people ask
How do I pick a color from an image?
Drop the image onto the tool above and click or tap the colour you want. Its HEX, RGB and HSL codes appear, with a button to copy the HEX.
Can I pick a color on my phone?
Yes. Tap the picture, or drag your finger across it, and the colour under your finger is shown.
Why is the code different from what my editor says?
Your editor may show the value in another colour space, such as Adobe RGB or Display P3. This tool converts to sRGB, the standard for web colours, so the code matches what a browser displays.
Does it show a magnifier?
No. The picker marks the spot with a ring. For very fine detail, zoom the picture in an editor first.
How is this different from the palette tool?
The picker returns the exact colour of the spot you choose. The palette finds the dominant colours of the whole picture. Both are on this page.
Is my picture uploaded to a server?
No. The picture is read and analysed inside your browser tab, on your own device. Nothing is uploaded, so you can use it with client work and unreleased designs.
Which image formats can I use?
JPG, PNG, WebP, GIF, TIFF, BMP, TGA and more. Transparent areas are treated as white.
Is it free?
Yes. There is no limit, no watermark and no account. PhotoRiya is open source under the MIT and Apache 2.0 licenses.
More free tools
- Color palette from image with HEX codes in a clickExtract the dominant colors of an image as HEX, RGB and HSL, with CSS and JSON export.
- Image converter to PNG, JPG and WebPConvert TIFF, WebP, BMP, TGA, GIF, ICO, EXR and HDR pictures to PNG, JPG or WebP.
- EXIF data viewer that shows what your photo revealsSee the EXIF metadata of a photo, with GPS location and other personal details flagged.