Convert

RGB to hex converter

Pick the RGB tab, move the red, green and blue sliders, and read the matching hex code instantly. HueKit also shows HSL, HSV and CMYK so you have every format at once.

#12C2E9
HEX#12C2E9
RGBrgb(18, 194, 233)
HSLhsl(191, 86%, 49%)
HSVhsv(191, 92%, 91%)
CMYKcmyk(92%, 17%, 0%, 9%)
Shades and tints
04272f
074e5d
0b748c
0e9bba
12c2e9
41ceed
71daf2
a0e7f6
d0f3fb
Complementary
12c2e9
e93912
Analogous
12e9a5
12c2e9
1257e9
Triadic
12c2e9
e912c2
c2e912

Converting RGB to hex

RGB describes a color as three numbers from 0 to 255: how much red, green and blue light to mix. Hex packs those same three numbers into a six character string. Each channel becomes two hex digits, and they are written in the order red, green, blue after a hash.

To convert a channel by hand you divide by 16 for the first digit and take the remainder for the second. So 235 becomes EB, because 235 is 14 times 16 plus 11, and 14 is E while 11 is B. HueKit runs that for all three channels the instant you change a value.

Why designers hand off hex

Hex is compact and unambiguous, which is why it dominates CSS and design files. RGB is more useful when you are doing math on colors in code, for example blending pixels on a canvas. Since they are the same color in two notations, you can move freely between them. If you need the reverse direction, use the hex to RGB converter.

Frequently asked questions

How do I convert RGB to hex?

Take each channel value from 0 to 255 and write it as a two digit base 16 number, then join red, green and blue with a leading hash. HueKit does this instantly as you move the sliders.

Why is 255 written as FF in hex?

Hex is base 16, so two digits cover 0 to 255. FF is 15 times 16 plus 15, which equals 255, the maximum for a single channel. That is why full white is FFFFFF.

Are RGB and hex the same color?

Yes. Hex is simply a shorter way to write the same three RGB channels, so rgb(37, 99, 235) and #2563EB describe exactly the same color.

Related tools