Color converter

Enter any CSS color — HEX, RGB, HSL, HSLa, HWB, OKLCH, OKLab or a named color — and instantly see all equivalent values, plus WCAG contrast ratios against white and black.

No uploads · Everything runs in this browser

Contrast (WCAG 2)

Text on whiteText on black
Ratio
AA large text (3:1)
AA normal text (4.5:1)
AAA normal text (7:1)

FAQ

What is OKLCH?

OKLCH describes a color by lightness, chroma and hue in a perceptually uniform space. Changing only the lightness keeps the hue looking the same, which makes it handy for design systems. All modern browsers support it in CSS.

Why is CMYK marked as approximate?

Real print colors depend on the paper, ink and ICC profile. This tool uses a simple formula without a profile, so check with your printer for exact values.

What color formats can I enter?

HEX (#fff, #ffffff, #ffffffff), rgb(), rgba(), hsl(), hsla(), hwb(), oklch(), oklab() and CSS named colors such as tomato or rebeccapurple are all accepted.

What does the WCAG contrast check show?

It shows the contrast ratio of your color against pure white and pure black, and whether it passes AA (4.5:1 for normal text, 3:1 for large) and AAA (7:1 for normal text) criteria from WCAG 2.

Can I use this tool offline?

Yes. The converter uses only CSS color parsing logic built into the browser and works without an internet connection once the page has loaded.

Send feedback

Report a problem or suggest a feature.

Add this only if you would like a reply.