Back to UI design
Colour converter: HEX, RGB, HSL, OKLCH and contrast check
Paste a colour in any format and get HEX, RGB, HSL and OKLCH instantly, plus the contrast ratio on white and dark backgrounds.
How to use
- Paste a colour code in any format, or click the swatch to pick one.
- Read the converted HEX, RGB, HSL and OKLCH values.
- Click Copy on the line you need. Check whether text in this colour is readable on white and dark backgrounds.
Frequently asked questions
Which colour format should I use?
HEX is the most common. OKLCH is newer and lets you adjust lightness without shifting the hue; every modern browser supports it.
Does it read colours with transparency?
Yes, but the alpha part is ignored in the conversion.
What does Pass AA mean?
Body text is readable enough under the WCAG accessibility standard. Pass AAA is the stricter level.