/tools/hex-rgb-color-picker

HEX/RGB Color Picker

Get exact color codes from an image in the formats designers and developers use: HEX like #2563EB, RGB like rgb(37, 99, 235) and HSL, each with its own copy button.

Private & secure
Upload image or drag & drop
JPG · PNG · WebP

How to use the HEX/RGB Color Picker

01
Upload
Drop an image.
02
Click to pick
Click anywhere to grab a colour. A palette is extracted automatically.
03
Copy
Copy HEX, RGB or HSL, or the whole palette as CSS.

HEX and RGB: the same color, written two ways

Screens build every color from red, green and blue light, each with a value from 0 to 255. RGB writes those three numbers out in decimal: rgb(37, 99, 235). HEX writes the same numbers in hexadecimal, two digits per channel, after a hash sign: 37 is 25, 99 is 63 and 235 is EB, giving #2563EB.

To convert by hand, split a HEX code into pairs and convert each from base 16, where A to F stand for 10 to 15. FF is 255, 80 is 128 and 00 is 0. Three-digit shorthand such as #FFF doubles each digit, so it equals #FFFFFF. The picker shows HEX in uppercase, but case makes no difference.

When HSL is the better format

HSL describes the same color as hue (a position on the color wheel from 0 to 360 degrees), saturation and lightness. The example above is hsl(221, 83%, 53%). It is the easiest format to adjust by eye: lower the lightness for a darker shade or reduce the saturation for a softer version, while keeping the same hue.

Where to paste each format

CSS accepts all three formats anywhere a color is expected. Most design and presentation apps have a HEX field in their color dialog. Code for graphics and charting libraries often takes RGB values, sometimes divided by 255 to give numbers between 0 and 1.

Click on the image to pick, use the Copy button next to the format you need, and click a palette swatch to see codes for the image's main colors. The palette is calculated on the server from the uploaded image, and Copy palette as CSS gives you all of them as custom properties.

Supported formats

JPGPNGWebP

Files up to 25 MB. Large, high-resolution photos are supported.

Privacy

Your file is sent over HTTPS, processed in memory and returned straight away. It is never stored, never shared and never used for anything else. No account needed. How we handle files.

HEX/RGB Color Picker FAQ

How do I convert RGB to HEX?

Convert each channel to two-digit hexadecimal and join them after a hash sign: rgb(255, 128, 0) becomes #FF8000. The picker shows both formats for any pixel.

Does the picker include transparency (alpha)?

No. It returns the opaque RGB color of the pixel. Fully transparent areas have no real color and may read as black.

Why do some HEX codes have 3 or 8 digits?

Three digits are shorthand for six (#FA0 is #FFAA00). Eight digits add two for alpha, the opacity, which this picker does not output.

Are HEX codes case-sensitive?

No. #2563eb and #2563EB are the same color.

What is the difference between this and the Image Color Picker?

They share the same picker. This page focuses on reading and converting HEX and RGB codes.

Are my images safe?

Your file is sent over HTTPS, processed in memory and returned straight away. It is never stored, never shared and never used for anything else.

Is it free?

Yes. No account, no watermark and no limit on how many images you process. Files can be up to 25 MB.

Related tools

See all 6 color tools →