You spot a color you want to reuse: a button on a website, a shade in a design file, a tone in a presentation. You know it has an exact code, and you want that code, not a near guess. The natural assumption is that a color picker tool reaches into your screen, touches the pixel and reads the value off it.
That assumption is wrong for this tool, and it is better to know that up front. The Color Picker on Ovatly does not sample your screen. It does the second half of the job, exactly: once a color reaches it, you get the color in HEX, RGB and HSL, a large preview, copy buttons for each notation, and its contrast ratios against black and white. This guide explains the division of labour, so you capture the color the right way and then convert and check it without errors creeping in.
Contents
- Quick answer
- The honest split: capturing a color vs converting it
- What captures an on-screen color
- What the Color Picker does once the color is in
- How to get a HEX code, step by step
- Worked example: one blue, three notations, two verdicts
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
- References
Quick answer
Finding a HEX code is two jobs. Capturing the color is done by your operating system's own picker, which is what the tool's swatch opens, or by the Image Color Picker tool when the color lives inside an image file. Converting and checking the color is what the Color Picker does: bring the color in with the swatch or type a HEX value, then read and copy its HEX, RGB and HSL values, and check its contrast ratios against black and white before you use it for text.
The honest split: capturing a color vs converting it
People talk about "picking a color" as if it were one action. It is two, and different software does each one.
Capturing means taking a color from somewhere: a pixel on your screen, a point inside a photograph, a physical swatch you are matching by eye. Converting means expressing a color you already have in the notation you need, accurately, and checking whether it behaves well in its new home.
The Color Picker belongs firmly to the second camp, and that is what makes its readouts trustworthy: a tool that converts and verifies has one job, never letting a digit change silently between what you picked and what you paste into your CSS.
What captures an on-screen color
The swatch in the tool is your operating system's picker, and it is where an on-screen color gets picked up and carried into the tool.
The system picker may also offer extra formats, such as CMYK for print, that this page does not display. If you see a format in the swatch that the panel never mentions, that is why: the panel shows the three notations the web actually uses.
One case is routed elsewhere, plainly. If the color you want is inside an image file, the Image Color Picker tool does that job: upload the image there and click any point to read its color. The Color Picker then takes over for converting and checking, once you have a value to type in.
What the Color Picker does once the color is in
With a color loaded, the result panel shows it three ways at once: HEX, RGB and HSL, next to a large preview so you can confirm the color on screen is the color you meant. Each notation has its own Copy button, which removes the most common error in this workflow: retyping a six-character code by hand and transposing two digits.
The panel also shows the color's contrast ratios against black and white, computed with the WCAG relative-luminance formula, the same one accessibility checkers use. Those two numbers answer the question that matters the moment a color becomes text: will people be able to read it?
How to get a HEX code, step by step
- Open the Color Picker and click the swatch to open your operating system's picker, then select the color you captured. If you already have a HEX value, type it instead, like
#2563EB. - Look at the large preview and confirm it matches the color you intended; if it looks wrong, every code that follows will be wrong with it.
- Read the HEX, RGB and HSL values in the result panel.
- Copy the notation you need with its Copy button rather than typing it out.
- Check the contrast ratios against black and white before using the color for text, and note which background it belongs on.
Worked example: one blue, three notations, two verdicts
Take the blue #2563EB. In the result panel it reads as rgb(37, 99, 235) and hsl(221, 83%, 53%): one color, three exact descriptions, any of which you can copy.
Its contrast tells the second half of the story. Against white it measures 5.17:1, which passes the WCAG AA minimum of 4.5:1 for normal text. Against black it measures 4.06:1, which does not pass that minimum. Same blue, same code, two different verdicts, and a clear conclusion: this blue belongs on light backgrounds. That check is what turns a copied code into a usable color.
Limitations and honest tradeoffs
The tool does not sample your screen or reach into other applications. If a workflow promises one click from any pixel anywhere to a finished code, that promise belongs to dedicated eyedropper software, not to this page.
HSL values are rounded to whole numbers, so converting a color from its HSL readout back to HEX can differ by one unit in a channel. HEX and RGB are always exact, so when precision matters, copy those. The swatch is your operating system's picker, so it may show formats this page does not display. Finally, the built-in contrast check covers black and white backgrounds only; for a colored background, the Color Contrast Checker is the right tool.
Common mistakes
- Expecting the tool to grab a pixel for you. It reads what you bring to it. Capture with the system picker, or use the Image Color Picker for colors inside image files.
- Typing a color name or an
rgb()string into the HEX field. HEX input is 3 or 6 characters of 0-9 and A-F, optionally starting with#. Names andrgb()strings are invalid here and will be rejected. - Retyping codes by hand. One transposed digit is a different color. Use the Copy buttons.
- Copying the code and skipping the contrast check. A perfectly copied color can still be unreadable as text on the wrong background.
- Trusting the HSL readout as exact. It is rounded to whole numbers. For an exact value, copy HEX or RGB.
FAQs
Can this tool pick a color directly off my screen? No. The tool reads colors you bring to it. The swatch opens your operating system's own picker, which is where an on-screen color gets picked up, and once a color is in, the tool shows its HEX, RGB and HSL values and its contrast ratios. For a color inside an image file, use the Image Color Picker tool instead.
How do I get the HEX code of a color inside an image? That is the Image Color Picker tool's job: upload an image there and click any point to read its color. The Color Picker is for colors you can already name or pick with the system swatch, and for converting and checking them afterwards.
Why does the tool reject the value I typed? HEX colors are 3 or 6 characters of 0-9 and A-F, optionally starting with #. Anything else is invalid here, including color names and rgb() strings. Type the value as a HEX code, or pick the color with the swatch instead.
Which notation should I copy once I have the color? Copy the one your destination expects. HEX is the compact code most CSS uses, RGB lists the red, green and blue amounts, and HSL is the easiest to adjust by eye. Each value in the result panel has its own Copy button, so you never have to retype a code by hand.
Why does one color show two different contrast ratios? Because the tool measures the color against both black and white. The example blue #2563EB scores 5.17:1 against white, which passes the WCAG AA minimum of 4.5:1 for normal text, and 4.06:1 against black, which does not. For a colored background rather than black or white, use the Color Contrast Checker.
Conclusion
Getting a HEX code right is a relay, not a single click: the system picker or the image tool captures the color, and the Color Picker converts it exactly and checks it before you use it. If you want to understand what the three notations themselves mean and when each one earns its place, read the sibling guide, HEX vs RGB vs HSL: What Each Color Code Means. For more guides in this series, see our Color and Design Tools guides.
References
- MDN Web Docs, on the CSS color formats browsers accept: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
- W3C, Web Content Accessibility Guidelines (WCAG) 2.1, on contrast minimums: https://www.w3.org/TR/WCAG21/