HEX to RGB Converter – With RGBA Opacity and Live Preview
Advanced Color Space Converter
Perform precise color spectrum calculations across design vectors instantly

Quick answer
To convert HEX to RGB, split the 6-digit hex code into three pairs and turn each pair from base 16 into a number from 0 to 255. For #14B8A6: 14 = 20, B8 = 184, A6 = 166, so the color is rgb(20, 184, 166). A 3-digit code like #FFF is shorthand for #FFFFFF, which is rgb(255, 255, 255).
Our free hex to rgb converter shows a live preview of the color, lets you add transparency with an alpha slider (for rgba() output), and explains how each channel was calculated. Switch to RGB to Hex mode when you need to go the other way. It is made for web designers, front-end developers and anyone working with CSS, Figma or brand colors.
How HEX Color Codes Work
A hex color code such as #RRGGBB stores three values: red, green and blue. Each pair uses hexadecimal digits 0–9 and A–F, so it can hold 256 levels (00 to FF). RGB writes the same three values in ordinary decimal numbers. Both describe exactly the same color; hex is just shorter to type. That is why a hex to rgb conversion never changes how a color looks.
HEX to RGB Formula
| Channel | Hex pair | Calculation | Decimal |
|---|---|---|---|
| Red | 14 | 1 × 16 + 4 | 20 |
| Green | B8 | 11 × 16 + 8 | 184 |
| Blue | A6 | 10 × 16 + 6 | 166 |
Remember that A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
How to Use the HEX to RGB Converter
Step 1: Enter the HEX Color Code
Make sure Hex to RGB Mode is selected and type a 3 or 6 character code into the input, with or without the # sign. We enter #14B8A6, a teal shade.

Step 2: Set the Alpha Opacity (Optional)
Leave the Alpha Channel Opacity slider at 1.0 for a solid color and plain rgb() output. Move it below 1.0 to get an rgba() value with transparency, for example rgba(255, 87, 51, 0.5).

Step 3: Click Convert Color Spectrum
Press Convert Color Spectrum. If the code is not a valid 3 or 6 digit hex string, the tool shows a warning so you can fix it.

Step 4: Copy the CSS RGB Value
The preview turns teal and the hex to rgb output reads rgb(20, 184, 166). Click Copy CSS to paste it into your stylesheet. The Channel Splitting log shows each pair converted from base 16 to base 10.

Common HEX to RGB Values
| Color | HEX | RGB |
|---|---|---|
| Black | #000000 | rgb(0, 0, 0) |
| White | #FFFFFF | rgb(255, 255, 255) |
| Red | #FF0000 | rgb(255, 0, 0) |
| Lime green | #00FF00 | rgb(0, 255, 0) |
| Blue | #0000FF | rgb(0, 0, 255) |
| Yellow | #FFFF00 | rgb(255, 255, 0) |
| Cyan | #00FFFF | rgb(0, 255, 255) |
| Magenta | #FF00FF | rgb(255, 0, 255) |
| Gray | #808080 | rgb(128, 128, 128) |
| Royal blue | #2563EB | rgb(37, 99, 235) |
| Teal | #14B8A6 | rgb(20, 184, 166) |
| Orange red | #FF5733 | rgb(255, 87, 51) |
| Amber | #F59E0B | rgb(245, 158, 11) |
When to Use RGB, RGBA or HEX
- HEX is compact and common in design tools and brand guidelines.
- RGB is easier to read and adjust channel by channel, and is used by many APIs and image libraries.
- RGBA adds an alpha value from 0 (invisible) to 1 (solid), useful for overlays, shadows and glass effects in CSS.
Common Mistakes to Avoid
- Using the letter O instead of zero. Hex only allows 0–9 and A–F.
- Typing 4 or 5 digits. A hex to rgb converter needs exactly 3 or 6 characters (8-digit codes include alpha and are handled differently).
- Expanding shorthand wrongly. #1AF becomes #11AAFF, not #1AF000.
- Expecting alpha in hex. Use the slider here to get rgba() instead.
Need the reverse? Use the RGB to Hex Mode tab, or our dedicated RGB to HEX converter.
Frequently Asked Questions
How do I convert HEX to RGB?
Split the code into three pairs and convert each from base 16 to base 10. #2563EB becomes 25 = 37, 63 = 99, EB = 235, so rgb(37, 99, 235).
What is #FFFFFF in RGB?
#FFFFFF is rgb(255, 255, 255), pure white.
What does a 3-digit hex code mean?
It is shorthand. Each digit is doubled, so #FFF is #FFFFFF and #1AF is #11AAFF.
How do I get RGBA from a hex code?
Enter the hex code and move the alpha slider below 1.0. The tool outputs rgba() with your chosen opacity.
Can I convert RGB back to HEX?
Yes. Click RGB to Hex Mode and enter the red, green and blue values from 0 to 255.
Is this hex to rgb converter free?
Yes. It is free, needs no sign-up, and runs entirely in your browser.