How hex becomes RGB
After the hash, characters are hexadecimal digits. Pair them: FF is 255, 57 is 87, 33 is 51. That is rgb(255, 87, 51), a common orange used in hex-to-RGB examples.
Turn #RRGGBB into rgb() values
Free hex to RGB converter for CSS. Paste #RRGGBB, shorthand #RGB, or 8-digit hex with alpha. Copy rgb() or rgba(). Nothing leaves this tab.
| #FF5733 | rgb(255, 87, 51) |
| #292524 | rgb(41, 37, 36) |
| #FFF | rgb(255, 255, 255) |
| #000 | rgb(0, 0, 0) |
| 3 digits | #RGB expands to #RRGGBB |
| 6 digits | Solid sRGB |
| 4 or 8 | Includes alpha |
| # optional | FF5733 is fine |
After the hash, characters are hexadecimal digits. Pair them: FF is 255, 57 is 87, 33 is 51. That is rgb(255, 87, 51), a common orange used in hex-to-RGB examples.
Three-digit hex duplicates each nibble. Four-digit and eight-digit forms add opacity. CSS Color Module Level 4 treats #RRGGBBAA the same way this converter does.
If you already have channel numbers, use the RGB to Hex converter. Check a fill on a graphic in the SVG Viewer.
Split the hex into two-digit pairs after the #. Parse each pair as base 16. #FF5733 is 255, 87, 51, written rgb(255, 87, 51). This page does that as you type.
Yes. Three-digit hex doubles each character. #FFF becomes #FFFFFF, which is rgb(255, 255, 255). #F53 becomes #FF5533.
The last two digits are alpha 00-FF. Divide by 255 for the CSS alpha. #29252480 is charcoal at about 0.5 opacity: rgba(41, 37, 36, 0.5).
Only 0-9 and A-F are allowed. Length must be 3, 4, 6, or 8 digits after stripping #. Spaces and rgb() belong on the RGB to hex converter instead.
Yes. Parsing runs in this tab. There is no API call.