Colour converter
Convert a colour between HEX, RGB, HSL and CMYK, with a contrast check against black and white.
How it works
Enter a colour in any common notation to see it in the others, along with how it looks and whether black or white text is readable on it.
HEX and RGB describe the same thing in different notation — both give red, green and blue channel values from 0 to 255. HSL restates that as hue (an angle around the colour wheel), saturation and lightness, which is far easier to reason about when you want a lighter or less intense version of a colour.
CMYK is for print and is genuinely approximate here. Converting RGB to CMYK properly requires an ICC colour profile for the specific paper and press; the naive conversion shown is a reasonable preview and should not be used to specify a print job.
The contrast ratios are calculated per WCAG 2.1. A ratio of 4.5:1 is the AA threshold for normal body text, 3:1 for large text, and 7:1 for AAA. These are the numbers that decide whether text on this colour is legible for people with low vision.
This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected.
Common questions
- How do you convert HEX to RGB?
- Split the six hex digits into three pairs and read each as a base-16 number. #FF6B35 is FF = 255 red, 6B = 107 green, 35 = 53 blue.
- What contrast ratio do I need?
- WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 and 4.5:1 respectively.
- Why does my CMYK conversion not match my printer?
- Because an accurate conversion depends on the ICC profile for the specific ink, paper and press. A generic formula gives a preview, not a match.
Related pages
- Random colour and palette generator Generate random colours or a harmonious palette, with contrast checked.
- Colour shades and gradient generator Build a tint and shade scale from one colour, or a gradient between two.
- Extract colours from an image Pull the dominant colours out of an image as a palette.
- Percentage calculator Work out a percentage of a number, what percent one number is of another, and percentage change.
- Loan and EMI calculator Monthly payment, total interest and total repaid for any loan amount, rate and term.
- BMI calculator Body mass index from height and weight, in metric or imperial, with what the number does and does not mean.
- Word and character counter Words, characters, sentences, paragraphs and reading time, counted as you type.
- Password generator Generate strong random passwords in your browser, with the entropy shown.
- Typing speed test Measure words per minute and accuracy on a one, two or five minute test.
- Image format converter and compressor Convert between JPEG, PNG and WebP, and compress with a quality slider.