Developer · Colour spaces

Color Converter

One colour, every notation

HEX, RGB, HSL, HWB, LAB and OKLCH side by side, with WCAG contrast ratios against black and white.

6 notationsContrast checkAlphaCopy all
Notations
6
Gamut
sRGB
Uploaded
0 B

Color Converter

Runs in your browser · nothing uploaded
From
To
oklch(0.9323 0.219 123.3)
Every notation, and contrast
Every notation, and contrast
UnitSymbolValue
HEXhex#CDFF2E
RGBrgbrgb(205 255 46)
HSLhslhsl(74.4 100% 59%)
HWBhwbhwb(74.4 18% 0%)
LABlablab(94.07% -34.86 83.13)
OKLCHoklchoklch(0.9323 0.219 123.3)
Contrast on blackratio17.94 : 1 · AAA for body text
Contrast on whiteratio1.17 : 1 · Fails WCAG
Relative luminanceL0.847
Preview
Text in this colour on white
Text in this colour on black

01 — How to use Color Converter

1 Enter a colour Any notation the tool emits, plus a few conveniences: hex with or without the hash, shorthand like #abc, functional notations with commas or spaces, and common colour names.
2 Read every notation HEX, RGB, HSL, HWB, LAB and OKLCH for the same colour, formatted as valid CSS you can paste directly.
3 Check the contrast WCAG contrast ratios against black and white, each with the conformance level it reaches — which is the number that decides whether text on that background is legible.
4 Copy what you need Every row is copyable. Nothing is uploaded; the conversion is arithmetic in this tab.

02 — Getting good results

OKLCH is the one worth learning Equal steps in its lightness look equal to the eye, which HSL does not manage — an HSL lightness of 50% is a very different perceived brightness for yellow than for blue. That makes OKLCH far better for generating consistent palettes and accessible colour ramps.
Contrast is about the pair, not the colour No colour has a contrast ratio on its own. The figures here are against black and white as the two extremes; for real text, check the actual pair you are using.
Hex shorthand doubles each digit #abc means #aabbcc, not #a0b0c0. That is why shorthand can only express 4,096 of the 16.7 million sRGB colours — every channel value is a repeated digit.

03 — Questions

No. Every conversion is arithmetic running in this browser tab.

04 — More about Color Converter

61 more tools
where this came from.

Same shell, same shortcuts, same promise: nothing leaves your browser.

Browse all 62