Hex to RGB Converter
Paste a 6-digit hex code to get its RGB value — instantly, with no signup.
What Is a Hex Color Code?
A hex color code is a six-character string, prefixed with #, that packs the same red-green-blue information as RGB into base 16 instead of base 10 — two characters per channel, each ranging from 00 to FF. It's the format you'll most often run into first: pasted into a CSS stylesheet, sitting in a brand style guide, or copied from a design file, because it's shorter and more compact to write than three comma-separated decimal numbers.
Converting a hex code to RGB is useful the moment you need that same color inside a tool that only accepts RGB sliders — some older photo editors, certain print-prep software, and a handful of programming color libraries expect RGB triplets rather than hex strings.
How the Conversion Works
Each hex code splits cleanly into three two-character pairs — one per RGB channel — and each pair converts from base 16 to decimal independently:
C4 → (12 × 16) + 4 = 196
6A → (6 × 16) + 10 = 106
3A → (3 × 16) + 10 = 58
#C46A3A → rgb(196, 106, 58)
The tool above does this instantly as you type, but the underlying math is simple enough to sanity-check by hand: each hex letter A–F stands in for the decimal values 10–15, so a two-digit hex pair maxes out at F (15) × 16 + F (15) = 255 — exactly the upper bound of an RGB channel.
Common Hex to RGB Conversions
Hex and RGB values for 20 named colors from Colortion's library — click a name for the full color page, including pairing suggestions and palettes that use it.
| Color | Hex | RGB |
|---|---|---|
| Sage Green | #87A878 | 135, 168, 120 |
| Dusty Rose | #C4847A | 196, 132, 122 |
| Terracotta | #C46A3A | 196, 106, 58 |
| Navy Blue | #1B2A4A | 27, 42, 74 |
| Lavender | #B89AC4 | 184, 154, 196 |
| Coral | #FF6B6B | 255, 107, 107 |
| Forest Green | #2D6A4F | 45, 106, 79 |
| Burgundy | #800020 | 128, 0, 32 |
| Teal | #14B8A6 | 20, 184, 166 |
| Mustard Yellow | #D4A017 | 212, 160, 23 |
| Blush Pink | #F9C6C6 | 249, 198, 198 |
| Slate Blue | #6A9AB8 | 106, 154, 184 |
| Olive Green | #6B7C3C | 107, 124, 60 |
| Burnt Orange | #CC5500 | 204, 85, 0 |
| Mauve | #A87EA8 | 168, 126, 168 |
| Cobalt Blue | #0047AB | 0, 71, 171 |
| Emerald Green | #50C878 | 80, 200, 120 |
| Rose Gold | #B76E79 | 183, 110, 121 |
| Champagne | #F7E7CE | 247, 231, 206 |
| Periwinkle | #CCCCFF | 204, 204, 255 |
Hex or RGB — Which Should You Use?
Neither format is more "correct" — CSS, design tools, and most color pipelines treat them as interchangeable. Reach for RGB when you need an alpha/transparency channel via rgba(), or when a tool you're working in already outputs RGB and converting would be an extra, unnecessary step. Stick with hex for everything else — it's the more common default across design software, brand guidelines, and color-reference sites, and six characters are quicker to communicate than three separate numbers.
Starting from RGB instead? Use the RGB to Hex converter instead.
Frequently Asked Questions
How do I convert hex to RGB?
Split the six hex digits into three pairs, then convert each pair from base 16 to decimal (0–255). For example, #C46A3A splits into C4, 6A, and 3A — which convert to 196, 106, and 58, giving rgb(196, 106, 58).
Why does a hex code start with a # symbol?
The # prefix is a CSS and HTML convention that tells the browser "the following six characters are a hex color code" rather than a color name or another value type. It has no mathematical meaning — dropping it (e.g. C46A3A instead of #C46A3A) still represents the same color in tools that expect a bare hex string.
What do the letters A–F mean in a hex code?
Hex is base 16, which needs 16 symbols per digit instead of the 10 (0–9) that decimal uses. The letters A through F fill in for the values 10 through 15, so a hex digit can be any of 0123456789ABCDEF.
Does converting hex to RGB change the actual color?
No — hex and RGB are two exact notations for the identical color value, so the swatch you see for a hex code and its converted RGB value will always match exactly, pixel for pixel.