All Tools490+

HEX to RGB Converter – With RGBA Opacity and Live Preview

Advanced Hex to RGB Converter Online - Real-Time Color Space Engine | VectraTools

Advanced Color Space Converter

Perform precise color spectrum calculations across design vectors instantly

Selected Spectrum Preview
1.0
Copy CSS
Calculated CSS Color Output
rgb(37, 99, 235)
Channel Splitting Analysis Logs:
HEX to RGB Converter online tool by VectraTools

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

ChannelHex pairCalculationDecimal
Red141 × 16 + 420
GreenB811 × 16 + 8184
BlueA610 × 16 + 6166

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.

HEX to RGB converter with hex code 14B8A6 entered

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).

Alpha channel opacity slider set to 1.0

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.

Clicking the Convert Color Spectrum button

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.

HEX to RGB result showing 14B8A6 equals rgb 20 184 166 with channel breakdown

Common HEX to RGB Values

ColorHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Lime green#00FF00rgb(0, 255, 0)
Blue#0000FFrgb(0, 0, 255)
Yellow#FFFF00rgb(255, 255, 0)
Cyan#00FFFFrgb(0, 255, 255)
Magenta#FF00FFrgb(255, 0, 255)
Gray#808080rgb(128, 128, 128)
Royal blue#2563EBrgb(37, 99, 235)
Teal#14B8A6rgb(20, 184, 166)
Orange red#FF5733rgb(255, 87, 51)
Amber#F59E0Brgb(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.

MH

Written and tested by Muhammad Hasnain

Founder of VectraTools. Every color value in this guide was checked against the tool's own output. Last reviewed: October 2026.