Skip to content
kitify
Esc
↑ ↓ to moveEnter to open

HEX to RGB colour converter

Paste a colour in any format and get every other format, plus whether text on it passes accessibility contrast.

Aa white

5.91:1 · AA

Aa black

3.55:1 · AA large text only

HEX
#0B6E7F
RGB
rgb(11, 110, 127)
HSL
hsl(189, 84%, 27%)
HSV / HSB
189°, 91%, 50%
CMYK
91%, 13%, 0%, 50%
Android / Flutter
0xFF0B6E7F
SwiftUI
Color(red: 0.043, green: 0.431, blue: 0.498)

Tints and shades (click to use)

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.