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.
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.