How to Convert RGB Color to HEX
Turn RGB or RGBA color values into HEX codes for CSS, design tools, and brand guidelines.
Tool Used
RGB to HEX
Open the RGB to HEX tool
Navigate to /tools/color/rgb-to-hex.
Enter the RGB values
Type the red, green, and blue values into their respective input boxes. Each value is a number from 0 to 255. You can also paste a full rgb() or rgba() string and the tool will parse out the values automatically.
Read the HEX output
The corresponding HEX color appears instantly below the inputs. It starts with a hash symbol and has six characters in standard form (eight if you include alpha).
Add an alpha channel if needed
If you need transparency, use the alpha input or slider. The output becomes an eight digit HEX value where the last two characters represent the alpha channel from 00 (fully transparent) to FF (fully opaque).
Copy and use
Click Copy to grab the HEX value. Paste it into your CSS, your design tool, your brand guidelines document, or wherever a HEX color is expected.
All done!
You are ready to use RGB to HEX like a pro.