Colour Converter
Convert a CSS colour to HEX, RGB, HSL, HWB, OKLCH, Lab and CMYK, and check its contrast.
- Privacy
- This tool runs in your browser. Nothing you enter is sent to Wayfind.
- Filed under
- Filed under
Convert a CSS colour to HEX, RGB, HSL, HWB, OKLCH, Lab and CMYK, and check its contrast.
Hexadecimal in three, four, six or eight digits, the 148 CSS colour names and transparent, rgb and hsl in the space syntax of CSS Color 4 or the older comma syntax, and hwb, lab, lch, oklab and oklch in the space syntax, each with an alpha value if you want one. Values are read as a browser reads them: rgb(300 0 0) is red, and a negative lightness counts as zero.
Because that colour is outside sRGB, which hexadecimal, rgb, hsl, hwb and cmyk describe. Those values are then the nearest sRGB colour, channel by channel, and the tool says so; the OKLCH, OKLab, Lab and LCH values stay exact.
No. It is the simple arithmetic conversion, without an ICC profile or ink limits, so it is useful as a starting point only. Ask your printer for values from their own profile.
They are WCAG 2 contrast ratios against white and black; a see-through colour is measured as it shows over each. Ordinary text needs 4.5 to 1 for level AA and 7 to 1 for AAA; large text (from 24 px, or 18.66 px bold) needs 3 to 1 and 4.5 to 1.