Enter a color
Type a HEX, RGB, HSL, HSV or CMYK value, or pick one with the color picker.
Developer Tools
Convert colors between HEX, RGB, HSL, HSV, and CMYK, and check WCAG contrast.
Convert a color between HEX, RGB, HSL, HSV and CMYK and see its contrast against white and black, entirely in your browser. Resizing or converting the images that use these colors? Try the Image Converter.
Accepts HEX (3, 4, 6 or 8 digits), rgb()/rgba(), hsl()/hsla(), hsv() and cmyk(). CSS color names are not supported.
HEX
#1e90ff
RGB
rgb(30, 144, 255)
HSL
hsl(209.6, 100%, 55.9%)
HSV
hsv(209.6, 88.2%, 100%)
CMYK
cmyk(88.2%, 43.5%, 0%, 0%)
HSL, HSV and CMYK are rounded to one decimal place. CMYK is a simple mathematical conversion, not a print color profile.
On white: 3.24:1
On black: 6.49:1
How it works
Type a HEX, RGB, HSL, HSV or CMYK value, or pick one with the color picker.
The same color is shown in all formats, including alpha when present.
WCAG contrast ratios against white and black show which text color is readable.
Use cases
Turn a HEX code from a design file into the rgb() or hsl() form your CSS uses.
Check whether text on a background meets WCAG AA or AAA contrast.
Read a color's HSL values to see how to make it lighter, darker or less saturated.
FAQ
No. Everything is calculated in your browser.
HEX (3, 4, 6 or 8 digits, with or without #), rgb()/rgba(), hsl()/hsla(), hsv() and cmyk(). CSS color names such as "tomato" are not supported.
No. CMYK here is the standard mathematical conversion from sRGB. Real print results depend on the printer, ink and color profile, so use it as a starting point only.
HEX and RGB are exact whole numbers. HSL, HSV and CMYK are shown rounded to one decimal place, so converting back can differ by one in a channel.
Using the WCAG 2.x relative luminance and contrast ratio formulas. Transparency is ignored: the color is treated as opaque.
Related Tools