Convert a colour and check its contrast
Paste a colour in any format and get the others back, plus the contrast ratio against white and black with the accessibility grade, which is the part that usually matters.
- Runs in your browser
- Nothing uploaded
- No account
- No watermark
- Free
How to colour converter
- Paste a colour: a hex code, an RGB or HSL value, or a CSS colour name.
- Read off the format you need.
- Check the contrast grades before you put text on it.
The contrast part is the useful part
Contrast ratio compares the brightness of two colours and runs from 1 to 1, meaning identical, up to 21 to 1 for black on white. The accessibility thresholds everyone works to come from WCAG:
- 4.5 to 1 for normal body text. This is AA, and it is the level most organisations treat as required.
- 3 to 1 for large text, meaning roughly 24 pixels, or 19 pixels when bold. Also the threshold for icons and interface boundaries.
- 7 to 1 for AA A, a higher bar worth meeting for long reading.
The brand colour that fails most often is a mid tone, and mid toned blues and oranges fail most of all. A colour can look perfectly readable to you on a bright laptop and be genuinely hard work on a phone outdoors, which is what the ratio is there to catch.
Why HSL is worth using
Hex and RGB describe a colour in terms a screen understands. HSL describes it in terms a person understands: hue, how saturated it is, how light it is.
That makes HSL far better for building a palette. Take a hue, hold it still, and change the lightness, and you get a set of tints and shades that genuinely belong together. Doing the same in hex means guessing. If you want a hover state slightly darker than your button, dropping the lightness by eight percent in HSL does it predictably.
About the CMYK figure
The CMYK values here are a straightforward arithmetic conversion, which is enough for a rough idea. Real print conversion depends on the press, the paper and the colour profile, and a printer will convert properly using the profile for the job. Do not hand these numbers to a printer and expect an exact match, and never rely on a screen for a print colour decision.
Questions
What contrast ratio do I need?
4.5 to 1 for normal text and 3 to 1 for large text, to meet WCAG AA. 7 to 1 meets the higher AAA level.
How do I convert hex to RGB?
Paste the hex code in and the RGB value appears with the others. A hex code is just three pairs of hexadecimal digits for red, green and blue.
Can I paste a CSS colour name?
Yes. Any name your browser understands works, including the unusual ones such as rebeccapurple and papayawhip.
Are the CMYK values accurate for printing?
They are a rough arithmetic conversion. Real print colour depends on the press, paper and colour profile, so let your printer convert using the profile for the job.
The rest of the toolkit
Every one of these runs on your own device. Nothing is uploaded, and there is no counter anywhere.
Image tools
Text and generators