Skip to content
FR – lire en français

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

  1. Type a colour or use the picker.
  2. Copy the format you need.
  3. Check its contrast on white and on black.

Details

Colour Converter details
ReadsHEX (3, 4, 6 or 8 digits), rgb(), hsl() and common names
WritesHEX, rgb(), hsl() and oklch()
ContrastWCAG 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.