Colour Converter
Convert colours between HEX, RGB, HSL and OKLCH, and check contrast.
Loading the tool on your device…
Type or pick a colour and get it in the four formats CSS understands, ready to paste. The contrast check tells you if text in that colour is readable on white or black, by the WCAG accessibility rules.
Updated 7 December 2026 · runs in your browser
How to use it
- Type a colour or use the picker.
- Copy the format you need.
- Check its contrast on white and on black.
Details
| Reads | HEX (3, 4, 6 or 8 digits), rgb(), hsl() and common names |
|---|---|
| Writes | HEX, rgb(), hsl() and oklch() |
| Contrast | WCAG 2 ratio with AA and AAA results |
Questions
Do my files leave my computer?
No. This tool runs inside your browser tab. The page makes no network request with your data, and you can check that yourself in your browser's developer tools.
What is OKLCH, and why use it?
It is a newer way to write colours where equal steps look equally different to the eye. That makes it easier to build palettes with even lightness. All current browsers support it.
Related tools
- Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and any base.
- QR Code Maker
Turn a link or text into a QR code to print or share.