Hex to RGB Converter
Convert a hex color code to RGB and HSL with a color preview — or go the other way.
#1E90FF is rgb 30 144 255.
#1E90FF
HEX#1E90FF
RGBrgb(30, 144, 255)
HSLhsl(210, 100%, 56%)
Decimal (24-bit)2,003,199
Step by step
- Split the hex code into three pairs: 1E | 90 | FF
- Convert each pair from hexadecimal to decimal: 1E = 1 × 16 + 14 = 30; 90 = 9 × 16 + 0 = 144; FF = 15 × 16 + 15 = 255
- So #1E90FF = rgb(30, 144, 255)
RGB → hex
#FF6347 is rgb 255 99 71.
#FF6347
HEX#FF6347
RGBrgb(255, 99, 71)
HSLhsl(9, 100%, 64%)
Decimal (24-bit)16,737,095
Step by step
- Split the hex code into three pairs: FF | 63 | 47
- Convert each pair from hexadecimal to decimal: FF = 15 × 16 + 15 = 255; 63 = 6 × 16 + 3 = 99; 47 = 4 × 16 + 7 = 71
- So #FF6347 = rgb(255, 99, 71)
How hex colors work
A hex color is three bytes: red, green, blue. #1E90FF = 1E | 90 | FF = 30, 144, 255. Short codes double each digit: #FFF = #FFFFFF (white). Each channel runs 0–255, giving 16,777,216 colors.
Frequently asked questions
What is #FFFFFF in RGB?
rgb(255, 255, 255) — white.
What is #1E90FF in RGB?
rgb(30, 144, 255).
How do I convert RGB to hex?
Convert each value 0–255 to two hex digits and join them: 255, 99, 71 → FF 63 47 → #FF6347.