How to Use the HEX to RGB Converter Online
- 1Paste the hexadecimal code with or without its leading hash. Use three or six digits for red, green, and blue, or four or eight to include alpha.
- 2Read the CSS RGB line for a function you can paste into a stylesheet. The remaining lines show the individual channel values.
- 3If the result includes alpha, check whether its displayed opacity is suitable for your use. The tool rounds the opacity to two decimal places.
- 4Copy the CSS function or one of the channel values and compare it with the source color when exact opacity matters.
Input & Output Examples
The shorthand expands to #33aaff and produces red 51, green 170, and blue 255.
#3afCSS RGB: rgb(51, 170, 255)
Red: 51
Green: 170
Blue: 255The last pair encodes the alpha byte. The report shows the opacity rounded to 0.5.
#33669980CSS RGB: rgba(51, 102, 153, 0.5)
Red: 51
Green: 102
Blue: 153
Alpha: 0.5Practical Developer Workflows
- Look up individual channel values for a token when a component library accepts red, green, and blue inputs separately.
- Convert a HEX color from a design handoff to a CSS function that is easier to adjust with an explicit opacity.
- Review which channel causes two similar brand colors to differ when comparing a design and an implementation.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.