Hex to RGB Converter
Convert hex color codes to RGB values.
RGB
rgb(255, 87, 51)
Red:255
Green:87
Blue:51
HSL
hsl(11, 100%, 60%)
Hue:11°
Saturation:100%
Lightness:60%
How to Do It Manually
Convert hex color codes (#RRGGBB) to RGB values (0–255). Each hex pair represents one color channel: first pair = red, second = green, third = blue.
Red = hex value of characters 1–2, Green = hex value of 3–4, Blue = hex value of 5–6
- Remove the # symbol if present.
- Take the first two characters and convert from hex to decimal (0–255).
- Repeat for the next two characters (green) and last two characters (blue).
Frequently Asked Questions
What about short hex codes like #FFF?
Shorthand: each character is doubled. #FFF = #FFFFFF (white).
Can I convert RGB back to hex?
Yes, convert each decimal value (0–255) to hex and concatenate with #.