Last updated: 2026-06-19
Hex to RGB Color Converter
Turn a hex color code into R, G, B values instantly.
A hex to RGB converter turns a hex color code like #00FF80 into separate red, green, and blue values (each 0–255). RGB values are handy for design tools and for the rgb() CSS function. Enter a hex code below — both three-digit and six-digit forms work, and the # is optional.
How to convert hex to RGB
- Type or paste your hex color code into the Hex color field (3 or 6 digits, # optional).
- The Red, Green, and Blue values appear instantly.
- Use the copy buttons to grab each channel value.
Worked example: #00ff80
The code splits into pairs: 00, ff, 80. Each pair converts from hex to decimal: 00 → 0, ff → 255, 80 → 128, giving rgb(0, 255, 128).
Reference table
| Color | Hex | RGB |
|---|---|---|
| Black | #000000 | 0, 0, 0 |
| White | #ffffff | 255, 255, 255 |
| Red | #ff0000 | 255, 0, 0 |
| Green | #008000 | 0, 128, 0 |
| Blue | #0000ff | 0, 0, 255 |
| Yellow | #ffff00 | 255, 255, 0 |
| Orange | #ffa500 | 255, 165, 0 |
| Gray | #808080 | 128, 128, 128 |
Frequently asked questions
- How do I convert hex to RGB?
- Split the six-digit hex code into three pairs and convert each pair from hexadecimal to a decimal value from 0 to 255. This tool does it instantly.
- What is #ffffff in RGB?
- #ffffff in RGB is rgb(255, 255, 255), which is white.
- Does this support three-digit hex codes?
- Yes. Shorthand codes like #f09 are expanded automatically (to #ff0099) before conversion.
- Is the # required?
- No. The # prefix is optional — both 00ff80 and #00ff80 work.