HEX to RGB Converter
Convert hexadecimal color codes to RGB (Red, Green, Blue) values instantly. This converter translates the web-standard HEX format into RGB values that work in CSS, design tools, and programming languages.
Understanding HEX Colors
HEX color codes use a 6-character notation representing Red, Green, and Blue channels. Each pair of characters represents a value from 00 (0) to FF (255). The format is #RRGGBB where:
- RR = Red channel (00-FF)
- GG = Green channel (00-FF)
- BB = Blue channel (00-FF)
Conversion Formula
To convert HEX to RGB, split the HEX code into pairs and convert each from base-16 to decimal:
| HEX Pair | Calculation | RGB Value | FFF×16 + F = 15×16 + 15255 808×16 + 0 = 128128 000×16 + 0 = 00
Common HEX to RGB Conversions
ColorHEXRGB Red#FF0000rgb(255, 0, 0) Green#00FF00rgb(0, 255, 0) Blue#0000FFrgb(0, 0, 255) White#FFFFFFrgb(255, 255, 255) | Black | #000000 | rgb(0, 0, 0) |
Shorthand HEX
3-character HEX codes like #F00 expand by doubling each character: #F00 = #FF0000.
Using RGB in CSS
``css
.element {
color: rgb(255, 128, 0);
background-color: rgb(240, 240, 240);
}
``
Use this converter to quickly translate HEX colors to RGB format for your projects.