Colour converter and contrast checker
Convert colours between HEX, RGB and HSL and check WCAG contrast against white and black text. Free and private.
White text 4.04:1 · AA large text onlyBlack text 5.20:1 · AA
| HEX | #5c8a4e | |
|---|---|---|
| RGB | rgb(92, 138, 78) | |
| HSL | hsl(106, 28%, 42%) |
Contrast uses the WCAG formula. Body text needs at least 4.5:1 to meet level AA.
About this tool
Enter a HEX, rgb() or hsl() colour to convert it between formats and check how readable white or black text would be on it.
What you can do
- Convert a design colour into CSS formats
- Pick a colour visually and copy its values
- Check WCAG AA and AAA contrast for text
- Find readable text colours for buttons and banners
All tools · LLM API exercises · Free demo API
Frequently asked questions
What contrast ratio do I need?
WCAG level AA asks for at least 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 for normal text.
Does it support transparency?
Alpha values in rgba() and hsla() are accepted but ignored, because contrast depends on what is behind the colour.