At One Place

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