Hex to RGB Converter
Instantly convert HEX color codes to RGB values. Supports standard HEX (#RRGGBB), shorthand (#RGB), and HEX with alpha (#RRGGBBAA).
Examples: #FF5733, #f0a, #FF573380 (with alpha)
What is HEX Color?
HEX (hexadecimal) is a color representation format widely used in web design and development. It uses a six-digit combination of numbers and letters to represent colors, preceded by a hash symbol (#).
HEX Format Structure
#RRGGBB
- RR - Red component (00-FF)
- GG - Green component (00-FF)
- BB - Blue component (00-FF)
What is RGB?
RGB stands for Red, Green, Blue. It's an additive color model used for digital displays where colors are created by combining different intensities of red, green, and blue light. Each component ranges from 0 to 255.
RGB Format
rgb(red, green, blue)
Each value ranges from 0 (no color) to 255 (full intensity).
Common HEX to RGB Conversions
| Color Name | HEX | RGB | Preview |
|---|---|---|---|
| White | #FFFFFF | rgb(255, 255, 255) | |
| Black | #000000 | rgb(0, 0, 0) | |
| Red | #FF0000 | rgb(255, 0, 0) | |
| Green | #00FF00 | rgb(0, 255, 0) | |
| Blue | #0000FF | rgb(0, 0, 255) | |
| Yellow | #FFFF00 | rgb(255, 255, 0) | |
| Cyan | #00FFFF | rgb(0, 255, 255) | |
| Magenta | #FF00FF | rgb(255, 0, 255) |
How to Convert HEX to RGB
Manual Method
- Remove the # from the HEX code
- Split into three pairs (RR, GG, BB)
- Convert each pair from hex to decimal
- Format as rgb(red, green, blue)
Using Our Tool
- Enter your HEX code in the input field
- Or use the color picker to choose visually
- See the RGB result instantly
- Click "Copy" to copy the result
✓ Supports 3-digit shorthand (#f0a)
✓ Supports alpha channel (#ff573380)
When to Use RGB Instead of HEX
- CSS opacity: RGB supports the rgba() format for transparency
- Calculations: RGB values are easier to manipulate programmatically
- Readability: RGB values are more intuitive (0-255 vs hex digits)
Frequently Asked Questions
What is the difference between HEX and RGB?
Both represent the same colors but in different formats. HEX uses hexadecimal notation (#RRGGBB) while RGB uses decimal values (0-255). They are interchangeable in CSS and design tools.
Does this tool support 3-digit HEX codes?
Yes! Shorthand HEX codes like #f0a are automatically expanded to #ff00aa and converted to RGB.
Can I convert HEX with transparency (alpha channel)?
Yes, 8-digit HEX codes (like #FF573380) are supported. The alpha value will be converted to RGBA format: rgba(255, 87, 51, 0.50).