What Is a Color Picker & Converter?
This browser-based color tool provides direct on-screen pixel sampling through the native EyeDropper API when your browser supports it, and local mathematical conversion of opaque sRGB colors. Enter HEX, RGB, HSL or HSV values, then inspect an approximate CIELAB D65 readout. You can also check the calculated WCAG contrast ratio of a text/background color pair, try algorithmically adjusted suggestions and export CSS variables. It is not a monitor calibration device.
How to Use the Color Picker & Converter
- Choose a color: click Pick Color from Screen to sample a pixel when the EyeDropper API is available on HTTPS. Otherwise use the native color picker, quick presets or a text field.
- Convert values: type a complete valid
#RGB,#RRGGBB,rgb(255, 0, 0),hsl(120, 50%, 50%)orhsv(120, 50%, 50%)value. All editable formats update together; press Enter or leave a field to validate a complete entry. Errors leave your last valid color unchanged. - Read the formats: compare HEX/RGB/HSL/HSV and the calculated CIELAB D65 field. HSV is a design-friendly notation, not a native CSS color function, and the D65 Lab readout is not interchangeable with CSS
lab()(D50). - Test contrast: choose a background by HEX or native picker. The preview and WCAG 2.2 AA/AAA indicators update for the actual 8-bit color pair. Use Swap Colors to reverse the foreground/background.
- Try suggestions: pick an AA or AAA suggestion if available. They are generated by mixing your current foreground with black or white in sRGB until the desired text contrast is reached, not by measuring a display.
- Use your result: Copy HEX, Copy CSS or Download .CSS. You can Reset Colors to restore the initial pair. All conversion and export operations run locally in your browser.
How It Works
HEX represents the three 8-bit sRGB channels. RGB uses integer red/green/blue values from 0 to 255, while HSL and HSV rearrange the same channels into hue and two percentages. Conversions are performed with standard formulas and rounded to the nearest 8-bit sRGB channel when going back to HEX; therefore repeating fractional HSL/HSV conversions can introduce minor rounding changes. The read-only CIELAB values are calculated by linearizing sRGB, converting to CIE XYZ with a D65 reference white, and then applying the Lab transform. Because CSS lab() uses a D50 white point, the displayed D65 numbers are not CSS lab() declarations.
Contrast is calculated using WCAG 2.2 relative luminance: each sRGB channel is linearized, multiplied by its luminance coefficient, then the ratio of lighter to darker luminance is measured. The suggested alternatives mix 8-bit foreground channels toward black or white and select the smallest tested mix that meets the target ratio. This is a color-pair calculation, not an accessibility certification.
Understanding Your Results
- Color values — CALCULATED: the HEX, RGB, HSL, HSV and D65 Lab fields represent your current opaque sRGB color; all values are derived from the same 8-bit RGB triplet.
- Contrast ratio — CALCULATED: 1:1 means no luminance contrast; 21:1 is the maximum black-on-white or white-on-black ratio. WCAG 2.2 AA text requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1 respectively. Large text is at least 18pt regular or 14pt bold.
- Accessible suggestions — CALCULATED: a suggested swatch meets a contrast threshold against your selected background, subject to opaque sRGB rounding. If neither black nor white can meet a requested target against that background, it is labeled unavailable.
- Screen pixel — BROWSER-SAMPLED: when EyeDropper succeeds, its returned sRGB HEX represents the selected screen sample. This is not a physical spectrometer measurement of what the monitor emits.
- Unavailable / invalid: a disabled EyeDropper means the capability or secure context is absent. Invalid numeric ranges and unsupported formats do not silently create a new color.
Browser Limitations
Screen sampling requires a secure context, compatible browser, direct user click and user selection; unsupported browsers can use the native color input instead. The EyeDropper API is not universally supported and may be unavailable inside restricted frames. Color conversion and contrast use opaque sRGB only: there is no alpha compositing, display-P3/HDR processing, image upload, gamma calibration or physical display measurement. A readable color pair is only one part of website accessibility; font size, weight, text over images, focus styles and user preferences matter too.
Common Mistakes to Avoid
- Entering unsupported or incomplete formats: supported HEX is #RGB or #RRGGBB; RGB uses integer channels 0–255; HSL/HSV use degrees 0–360 and percentages 0–100. Alpha channels, percentages in RGB and CSS space-separated syntax are not accepted here.
- Using HSV as CSS:
hsv()is shown for design workflows; export the CSS HEX, RGB or HSL representation instead. - Confusing Lab white points: the calculated Lab value is D65 and should not be pasted directly into a CSS
lab()declaration, which uses D50. - Assuming AA or AAA means a complete site passes WCAG: the result checks only two opaque colors and the specified text-size contrast threshold. Other accessibility criteria are not tested.
- Assuming picked pixels are calibrated physical colors: browser screen sampling is not a hardware colorimeter or monitor profile verification.
Frequently Asked Questions
Can the eyedropper pick colors from outside my browser window?
In a supporting browser, the native EyeDropper API may let you select a pixel from outside the webpage after a user click. It requires browser support and a secure context, and the browser controls the user interaction.
Why doesn't the eyedropper button work for me?
The API may be unsupported, unavailable outside HTTPS, or restricted by the browser/environment. Try a supporting secure browser or use the native color input and text conversions.
Are HEX, RGB, and HSL always exactly interchangeable?
They describe corresponding sRGB colors, but this tool stores 8-bit RGB channels. HSL/HSV decimals are displayed with limited precision, so repeated conversions can introduce slight rounding differences. The D65 Lab field is a derived approximation and is not CSS Lab (D50).
Is my picked color data sent anywhere?
The widget does not upload color input, screen samples, contrast results or generated CSS. Conversion and export are handled within the browser. The host website may separately load its normal page assets and analytics.
What's the difference between RGB and HSL?
RGB describes red, green and blue channel intensity, while HSL describes hue, saturation and lightness. HSV describes hue, saturation and value (brightness). They are alternate representations of sRGB, not separate proofs of display accuracy.
Conclusion
Use the Color Picker & Converter to sample a browser-supported screen pixel, convert sRGB colors, compare calculated text contrast and export CSS for a project. For testing your monitor's display behavior rather than converting values, visit the Monitor Color Test.