How to Convert HEX Color to RGB
Turn HEX color codes into RGB and RGBA values for CSS, JavaScript, and design work.
Tool Used
HEX to RGB
Open the HEX to RGB tool
Navigate to /tools/color/hex-to-rgb.
Type or paste a HEX value
Enter your HEX color, with or without the hash symbol. Both six digit (#FF5733) and three digit shorthand (#F73) formats are supported. The tool also accepts eight digit HEX values that include an alpha channel.
Read the RGB output
The corresponding RGB values appear instantly. The output looks like rgb(255, 87, 51), ready to paste into your CSS or JavaScript.
Add opacity if needed
Use the alpha slider to add transparency. The result becomes rgba(255, 87, 51, 0.5) where the last value is the alpha (0 is fully transparent, 1 is fully opaque).
Copy and use it
Click Copy to grab the RGB or RGBA value. Paste it into your stylesheet, JavaScript variable, design token, or any place where RGB notation is required.
All done!
You are ready to use HEX to RGB like a pro.