RGB to Hex Converter
Enter three values from 0 to 255 and get the hex code. This is the reverse of hex-to-RGB and equally lossless, the same color, written in base 16 instead of base 10.
How the conversion works
Convert each channel from decimal to hexadecimal, then pad each result to two digits and concatenate.
To convert a channel by hand: divide by 16 for the first digit, and the remainder is the second. Digits above 9 are written A through F.