You are building a web page and the design calls for the exact blue in a screenshot. Eyeballing it gets you close, but close is not a color value. CSS wants a HEX code, an editor wants RGB channels, and the adjustment you actually need, a slightly lighter version of that blue, is easiest to make in HSL. Guessing produces rounds of trial and error, and the color still drifts.
Every pixel in the image already carries all three values. The job is reading the one pixel you mean, exactly, rather than some blended average of the area around it. This guide shows how to pull HEX, RGB and HSL from any pixel with the free Image Color Picker on Ovatly, which reads the image at full resolution in your browser and uploads nothing.
Contents
- Quick answer
- One pixel, three ways of writing its color
- What each format is actually for
- How to get the values, step by step
- Worked example: a red pixel and a grey pixel
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Open the Image Color Picker, choose your image, and hover over it: the magnifier shows the exact pixel under your pointer and the readout reports its color as HEX, RGB and HSL at the same time. Click or tap to save that color to your picked list, then copy any saved HEX with one click. Because the tool reads the image's own pixels at full resolution, the values are the literal values stored in the file, not an estimate taken from the scaled preview on your screen.
One pixel, three ways of writing its color
A pixel's color is a mix of red, green and blue light. The three formats are three notations for that same mix, not three different colors.
HEX writes the mix as a six digit code, one pair of digits per channel. #FF0000 is full red, no green, no blue. RGB writes the same mix as three numbers from 0 to 255: rgb(255, 0, 0). HSL describes the color the way people talk about it: a hue position on the color wheel, a saturation percentage, and a lightness percentage. Pure red is hsl(0, 100%, 50%): hue 0 is red, fully saturated, at half lightness.
Grey shows the pattern from the other side. A mid grey pixel reads #808080, rgb(128, 128, 128) and hsl(0, 0%, 50%). The three RGB channels are equal, which is exactly why the saturation is 0 percent: a grey has no hue at all, only lightness. Once you see that one example, the three formats stop being three things to learn and become one color read three ways.
What each format is actually for
HEX is the format of web work. It is one short token, easy to copy, paste and store, and it is what CSS and most design tools ask for first. When someone says "give me the color," they usually mean the HEX.
RGB is the format for tools that want the channels separately. Image editors, presentation software and print oriented tools often present red, green and blue as three fields or sliders. If you are typing a color into three boxes, RGB is the notation you need.
HSL is the format you edit with. Because it separates hue from saturation and lightness, you can take a picked color and make it lighter, darker or more muted by changing one number, instead of nudging three channels and hoping the result still looks like the same color. Picked the exact blue from a screenshot but need a paler tint of it for a background? Keep the hue and saturation where they are and raise the lightness. That single move is the main reason to read HSL at all, rather than treating it as a spare notation.
How to get the values, step by step
- Open the Image Color Picker and choose your image. The image is drawn at full resolution, so the pixel you point at is the pixel that gets read.
- Move your pointer over the image. The magnifier shows the area up close, and the readout previews the color under your pointer as HEX, RGB and HSL.
- Click or tap to save that color to your picked list. If the area is a photo rather than a flat graphic, sample a few spots and keep the reading that repeats.
- Copy the HEX of any saved color with one click and paste it where you need it, or note the RGB and HSL values straight from the readout.
Worked example: a red pixel and a grey pixel
Take an image with a pure red element in it. Hover over the red and the readout shows all three notations for the same pixel at once: #FF0000, rgb(255, 0, 0) and hsl(0, 100%, 50%). One click saves the color to your picked list, and one more click copies the HEX, ready to paste into a stylesheet.
Now move to a mid grey element in the same image: #808080, rgb(128, 128, 128), hsl(0, 0%, 50%). Nothing about the workflow changed; the three formats are simply describing a color with no hue in it. And if you needed a darker version of that grey for a border, HSL tells you exactly what to touch: leave the hue and saturation alone and lower the 50 percent lightness. One number, one predictable result.
Limitations and honest tradeoffs
The picker reports the literal pixel value stored in the file, converted with the standard formulas. That is exact, and exact is not the same as identical on every screen: two monitors can render the same HEX slightly differently, so a value can be right and still look a touch different on someone else's display.
Photos add a second caveat. A JPEG rarely holds one flat color across an area: compression makes neighboring pixels vary a little, so two clicks a few pixels apart can return slightly different values. Neither reading is wrong; the area genuinely holds both. Semi-transparent pixels are the third case. The tool reports their stored RGB plus an opacity note, because the color you actually see also depends on what sits behind that pixel.
Common mistakes
- Reading a blended preview pixel. If a tool samples the small on-screen preview instead of the full resolution image, it can land on a pixel that was blended during scaling. Read the real pixels.
- Trusting a single click in a photo. JPEG areas vary pixel to pixel. Sample a few spots in a flat area and use the value that repeats.
- Sampling a shadow or a highlight. A shaded pixel honestly reports a darker color, because that is what is stored. For the color of the surface itself, pick a well-lit flat area.
- Editing in RGB when you want a tint. Raising all three channels changes the character of the color. In HSL you change one number and keep the rest.
- Ignoring the opacity note. A semi-transparent pixel's stored RGB is not the color you see once it sits over a background.
FAQs
How accurate is the color the picker reports? It is the literal pixel value stored in the file, converted with the standard formulas. What can differ is your screen: two monitors may render the same HEX slightly differently.
Can I pick a color from a photo taken on my phone? Yes. Photos work the same as graphics. Pick a well-lit flat area and expect small variations between nearby pixels, because JPEG compression rarely leaves one flat color across an area.
What is HSL useful for? HSL separates hue from saturation and lightness, so it is the easiest form for making a color lighter, darker or more muted by changing one number instead of nudging three channels.
Why do nearby pixels in my photo give slightly different values? JPEG photos rarely contain one flat color; neighboring pixels vary a little from compression. Sample a few spots in a flat area and use the reading that repeats.
Is my image uploaded to a server? No. The picker runs in your browser and reads the pixels locally. The image is drawn on your device and never leaves it.
Conclusion
One click on the right pixel gives you all three formats at once: HEX to paste, RGB for channel based tools, and HSL for the moment you need to adjust the color rather than just copy it. The Image Color Picker reads the real pixels at full resolution and keeps your image on your device while it does it. Working from a product photo instead of a graphic? Our guide to matching a brand color from a photo of a product covers the sampling routine for that job and its honest limits. For more guides in this series, see our Image Tools guides, which pair each technique with the free tool that performs it.
References
- MDN Web Docs, on CSS color values and their notations: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
- MDN Web Docs, on the hsl() functional notation: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl