Hex to RGB Converter
Free hex to RGB converter. Enter a hex color code and instantly get the red, green, and blue values with a live color preview.
rgb(255, 87, 51) Please enter a valid hex color (e.g. #FF5733 or #F53).
Convert Hex to RGB with Our Free Online Tool
Enter any hex color code and instantly see the equivalent RGB values. Works with both 6-digit hex codes (like #FF5733) and 3-digit shorthand (like #F53). Results update live as you type.
What Are Hex and RGB Color Formats?
Hex (hexadecimal) encodes a color as a 6-character string prefixed with #. The first two characters represent red, the next two green, and the last two blue — each as a value from 00 to FF.
RGB specifies the same three channels as decimal integers from 0 to 255. For example, #FF5733 is the same color as rgb(255, 87, 51).
Hex to RGB Conversion Formula
Split the hex code into three pairs and convert each from base-16 to base-10:
- R = hex pair 1 → decimal (e.g. FF → 255)
- G = hex pair 2 → decimal (e.g. 57 → 87)
- B = hex pair 3 → decimal (e.g. 33 → 51)
Common Hex to RGB Conversions
| Hex | R | G | B |
|---|---|---|---|
| #000000 | 0 | 0 | 0 |
| #FFFFFF | 255 | 255 | 255 |
| #FF0000 | 255 | 0 | 0 |
| #00FF00 | 0 | 255 | 0 |
| #0000FF | 0 | 0 | 255 |
| #FFFF00 | 255 | 255 | 0 |
| #FF00FF | 255 | 0 | 255 |
| #00FFFF | 0 | 255 | 255 |
| #808080 | 128 | 128 | 128 |
| #FF5733 | 255 | 87 | 51 |
| #3498DB | 52 | 152 | 219 |
| #2ECC71 | 46 | 204 | 113 |