Tech / Colour Converter & Contrast
Colour Converter & Contrast
Convert any colour between HEX, RGB and HSL, get tints and shades, and check whether text and background colours pass accessibility contrast rules.
Colour
Contrast checker (WCAG)
| Use | AA | AAA |
|---|
Tints & shades (click one to use it)
HEX, RGB and HSL
These are three ways of writing the same colour in CSS. HEX such as #EE4A23 is short and common in design files. RGB such as rgb(238, 74, 35) gives the amounts of red, green and blue from 0 to 255. HSL such as hsl(12, 86%, 54%) gives the hue, saturation and lightness, which makes it easy to build lighter or darker versions of a colour - the tints and shades above.
What do AA and AAA mean?
They are levels in the Web Content Accessibility Guidelines (WCAG). Contrast is the difference in brightness between text and its background, written as a ratio from 1:1 to 21:1.
| Level | Normal text | Large text |
|---|---|---|
| AA | At least 4.5:1 | At least 3:1 |
| AAA | At least 7:1 | At least 4.5:1 |
Large text means about 24 px, or about 18.5 px in bold. AA is the level most websites aim for, and Australian government websites are expected to meet it.
Why does contrast matter?
Good contrast helps people with low vision, older readers, and anyone reading a phone outside in bright sun. Light grey text on white is the most common mistake - check it here before you use it.