Convert a hex color code to its rgb() values and back, with a live swatch so you can see the color as you work. Design tools hand you hex, but CSS gradients, canvas APIs and rgba transparency often need the individual red, green and blue components, and doing that conversion by hand is tedious. This tool accepts full six-digit and shorthand three-digit hex, shows the exact rgb() string ready to paste into your stylesheet, and updates a preview box so you catch a wrong value immediately. You can also enter RGB numbers to get the hex back. Type a hex code or pick a color, then copy the value you need. Everything runs in your browser with no external requests.
A six-digit hex color splits into three pairs for red, green and blue, each a value from 0 to 255, so #ff8800 becomes rgb(255, 136, 0).
Yes. Three-digit shorthand like #f80 is expanded to its full six-digit form before conversion.
Yes. Enter red, green and blue values and it produces the matching hex code with a live swatch preview.
Convert a hex color code to its rgb() values and back, with a live swatch so you can see the color as you work. Design tools hand you hex, but CSS gradients, canvas APIs and rgba transparency often need the individual red, green and blue components, and doing that conversion by hand is tedious.
Yes. Color Hex to RGB is completely free, with no sign-up and no usage limits.
Yes. Color Hex to RGB runs in any modern web browser. There is nothing to download or install.
Yes. Color Hex to RGB runs entirely on your device in your browser, so nothing you enter is uploaded to a server.
Link this tool from a README, doc or site. The badge links back to this page.
[](https://yourhack.ai/color-hex-rgb-dev)