Colour Converter
Convert a colour between HEX, RGB, HSL and OKLCH, and check its contrast against a background to WCAG.
What it does
Colour Converter reads the whole document before doing anything, so what comes back is either valid output or a specific error with the position that caused it — not a partially rewritten file.
When you need it
Usually when something has already gone wrong: a config file an application will not load, an API response that has to be read by a human, or an export that has to be checked before it goes anywhere near a database.
Limits and caveats
Key order is preserved as it appears in the input. Very large documents are limited by your device's memory rather than by an upload cap, since the parsing happens locally. Everything happens in your browser, so the file never leaves your device.
How to colour converter
- Type or pick a colour — HEX, RGB, HSL and named colours all parse.
- Copy whichever format you need.
- Set a background to see whether text on it can be read.
Frequently asked questions
- Why is the contrast check here and not its own tool?
- Because the moment you're choosing a colour is the moment the question matters. Finding out afterwards means changing it again.
- What is OKLCH?
- A perceptual colour space now in CSS. Its lightness matches what your eye sees, so a set of colours at the same L actually look equally light — which HSL famously does not manage.
- What counts as large text?
- 24px, or 19px bold. Large text gets a lower contrast threshold because size does some of the work legibility needs.
- Do my files get uploaded?
- No. This tool runs entirely in your browser, so the file never leaves your device.