How to convert HEX to RGB
A HEX colour like #0B6E7F is three pairs of hexadecimal digits: red 0B (11), green 6E (110) and blue 7F (127), so it's rgb(11, 110, 127). Paste any HEX, RGB, HSL or CSS colour name and every format updates.
Which format should I use?
- HEX is the most common in CSS and design tools.
- RGB / RGBA adds transparency with an alpha value.
- HSL (hue, saturation, lightness) is easiest for making lighter or darker versions of a brand colour.
- CMYK is for print. Screen-to-print conversion is approximate, so ask your printer for a proof.
Contrast and accessibility
WCAG 2.2 asks for a contrast ratio of at least 4.5:1 for body text (AA) and 3:1 for large text. The preview shows white and black text on your colour with their ratios, so you can pick a readable text colour straight away.
Questions people ask
How do I convert RGB to HEX?
Type rgb(255, 136, 0) or just 255 136 0 into the box, and the HEX code (#FF8800) appears in the list.
What does an 8-digit HEX code mean?
The last two digits are alpha (transparency). #FF880080 is orange at 50% opacity.
Can I use colour names?
Yes, any CSS name works, such as teal, tomato or rebeccapurple.
Is the CMYK value exact?
It's a standard mathematical conversion. Real print colours depend on the paper and ink profile, so use it as a starting point.