How to convert HEX to RGB
A hex code splits into three pairs — red, green, and blue. Convert each pair from base-16 to
base-10 (0–255). For example, #3B82F6 → 3B = 59, 82 = 130, F6 = 246 → rgb(59, 130, 246). Color Picker Lab does this instantly for any code.
HEX to RGB examples
| HEX | RGB |
|---|---|
#FF0000 | rgb(255, 0, 0) |
#00FF00 | rgb(0, 255, 0) |
#0000FF | rgb(0, 0, 255) |
#FFFFFF | rgb(255, 255, 255) |
#000000 | rgb(0, 0, 0) |
Frequently asked questions
- How do I convert hex to RGB?
- Split the hex code into three pairs — red, green, and blue — and convert each from base-16
to base-10 (0–255). For example,
#3B82F6→ 3B = 59, 82 = 130, F6 = 246 →rgb(59, 130, 246). - What is #FFFFFF in RGB?
rgb(255, 255, 255).- Does it support alpha?
- Yes — 8-digit hex returns
rgba().