HEX to RGB Converter
Paste a HEX color code to get its RGB value instantly. Supports short (#FFF), standard (#6C5CE7) and transparent (#6C5CE780) codes.
How to Convert HEX to RGB
A HEX code is three pairs of hexadecimal digits: #RRGGBB. Each pair is a number from 00 to FF, which equals 0 to 255 in decimal.
- Split the code into pairs:
6C,5C,E7. - Convert each pair: multiply the first digit by 16 and add the second. Letters count as A=10, B=11, C=12, D=13, E=14, F=15.
6C= 6×16 + 12 = 108;5C= 5×16 + 12 = 92;E7= 14×16 + 7 = 231.- Result:
rgb(108, 92, 231).
Short and Transparent HEX Codes
- 3-digit: each digit is doubled, so
#F80=#FF8800=rgb(255, 136, 0). - 8-digit: the last pair is alpha (transparency).
#6C5CE780=rgba(108, 92, 231, 0.5), because 80 hex = 128, and 128 ÷ 255 ≈ 0.5. - 4-digit: the short form of 8-digit codes, e.g.
#F808.
When to Use RGB Instead of HEX
Both describe the same color. RGB is handy when you need transparency with rgba(), or when code calculates color values. Need the opposite direction? Use the RGB to HEX Converter. For HSL as well, try the Color Converter.
Common Conversions
| Color | HEX | RGB |
|---|---|---|
#000000 | rgb(0, 0, 0) | |
#FFFFFF | rgb(255, 255, 255) | |
#FF0000 | rgb(255, 0, 0) | |
#00FF00 | rgb(0, 255, 0) | |
#0000FF | rgb(0, 0, 255) | |
#FFFF00 | rgb(255, 255, 0) | |
#00FFFF | rgb(0, 255, 255) | |
#FF00FF | rgb(255, 0, 255) | |
#808080 | rgb(128, 128, 128) | |
#6C5CE7 | rgb(108, 92, 231) | |
#1E3A8A | rgb(30, 58, 138) | |
#0F766E | rgb(15, 118, 110) |
Related Learning Guides
Frequently Asked Questions
What is the RGB value of #FFFFFF?
#FFFFFF is rgb(255, 255, 255), which is white.
Do I need the # symbol?
No. The converter accepts codes with or without #.
Can I convert 8-digit HEX codes?
Yes. The last two digits are treated as alpha, and the result is shown as RGBA.
Is HEX to RGB conversion exact?
Yes. Each HEX pair maps to exactly one value from 0 to 255, so there is no rounding for the color channels.
Does this tool send my colors anywhere?
No. The conversion runs entirely in your browser.