Color Converter (HEX, RGB, HSL)
Convert a color between HEX, RGB, HSL, HWB, OKLCH, and CMYK, and see its contrast with white and black for readable text.
Runs on your device.
HEX, rgb(), hsl(), hwb(), or a CSS color name.
How to Use It
- Type a color code or pick one.
- Copy any format.
- Check the contrast for text on white or black.
Questions and Answers
What is OKLCH?
A color space that matches the eye: two colors with the same lightness in OKLCH look equally light. Modern browsers support it in CSS.
What does the contrast number mean?
The WCAG contrast ratio goes from 1 to 21. Normal text needs at least 4.5, and large text at least 3.
Good to Know
Colors are in the sRGB space. CMYK is an approximation that does not match a printer color profile. lab() and oklch() input is not read yet.