Convert
Hex to RGB
Convert Hex to RGB in one step. Paste your values and get instant results—see the same color in all formats.
Popular conversions
Conversion guide
Hex to RGB — How it works
How Hex to RGB conversion works
A hex color code is a six-character string (plus #) in the form #RRGGBB. Each pair of hex digits represents one channel: Red, Green, and Blue. To convert to RGB, each pair is interpreted as a base-16 number and converted to decimal (0–255).
Formula
For each pair of hex digits (e.g. 1A): first digit × 16 + second digit.
1A → 1×16 + 10 = 26. FF → 15×16 + 15 = 255.
Examples: #FF0000 → RGB(255, 0, 0) (red). #1A2B3C → RGB(26, 43, 60). Shorthand codes like #F00 expand by doubling each digit: #F00 → #FF0000.