RGB to HEX converter
Type a RGB code to get HEX, plus every other code, the nearest RAL and Pantone, and the closest paint.
All codes
- RGB
- 212, 85, 30
- CMYK
- 0%, 60%, 86%, 17%
- HSL
- 18°, 75%, 47%
- HSV
- 18°, 86%, 83%
- LAB
- 52.5, 47.6, 54.0
- Nearest RAL
- 2009 Traffic Orange
- Nearest Pantone
- 1665C
- Closest paint
- Hempel 57100, Hempel
How RGB becomes HEX
- Write each channel in base 16: 212 is D4.
- 85 is 55 and 30 is 1E.
- Join the three pairs behind a #: #D4551E.
HEX and RGB are the same numbers written two ways, so this conversion is exact.
HEX to RGB converterCommon colors
| Color | RGB | HEX |
|---|---|---|
| RAL 9010 | 240, 237, 225 | #F0EDE1 |
| RAL 9016 | 240, 241, 234 | #F0F1EA |
| RAL 9005 | 14, 14, 16 | #0E0E10 |
| RAL 7016 | 56, 62, 66 | #383E42 |
| RAL 7035 | 197, 199, 196 | #C5C7C4 |
| RAL 3020 | 184, 29, 19 | #B81D13 |
| RAL 5015 | 11, 123, 176 | #0B7BB0 |
| RAL 6018 | 89, 154, 57 | #599A39 |
| RAL 1023 | 239, 183, 0 | #EFB700 |
| RAL 2004 | 222, 83, 6 | #DE5306 |
When you need RGB to HEX
Design tools and browsers often show RGB, while code, brand guides and most color pickers ask for HEX. The conversion writes each of the three RGB numbers as two base-16 digits: 255 becomes FF, 128 becomes 80 and 0 becomes 00.
Questions
How do I convert RGB to HEX by hand?
Divide each value by 16: the whole number is the first digit and the remainder the second, with 10 to 15 written A to F. 47 is 2 × 16 + 15, so 2F.
Is the conversion exact?
Yes. HEX and RGB are the same numbers in different bases, so nothing is lost either way.