RGB to HEX converter
Enter red, green and blue values from 0 to 255, or paste a value like rgb(59, 130, 246).
HEX
HSL
How RGB to HEX conversion works
Each RGB value (0–255) is written as a two-digit hexadecimal number, then the three are joined: red, green, blue. For rgb(59, 130, 246): 59 = 3B, 130 = 82, 246 = F6, so the hex code is #3B82F6.
Going the other way? Use the HEX to RGB converter, or grab a color with the screen color picker.