How to convert HEX to RGB
- Type the HEX code, with or without the # sign.
- Click Convert.
- Read the red, green and blue values from the result.
How the conversion works
Split the six digits into three pairs and convert each pair from base 16 to a number from 0 to 255.
Example: #FF5733. FF is 255, 57 is 87 and 33 is 51, so the result is rgb(255, 87, 51).
Three-digit HEX codes
A short code such as #F53 means each digit is doubled: #FF5533, which is rgb(255, 85, 51). This tool accepts both 3-digit and 6-digit codes.
Good to know
- The input is not case sensitive.
- Codes with an alpha channel (8 digits) are not supported. Enter the 6-digit color.
- If the code is invalid, the tool tells you instead of showing a wrong color.
Frequently Asked Questions
What is #FFFFFF in RGB?
rgb(255, 255, 255), which is white. #000000 is rgb(0, 0, 0), black.
Do I need to type the # sign?
No. FF5733 and #FF5733 both work.
How do I use the RGB result in CSS?
Write it as rgb(255, 87, 51).
More Color Converters