OpenReplay Logo
12k
12k

HEX to RGBA converter

Convert hexadecimal colors to rgba() notation. Paste any 3-, 6- or 8-digit hex value, set the opacity, and the conversion runs in your browser.

HEX input Processed locally
RGBA result Recents none yet
rgba(57, 77, 254, 0.5) alpha 0.5

About this tool

RGBA extends RGB notation with an alpha channel for transparency (0–1). Converting a hex color to rgba() is the quickest way to add opacity to an existing brand or design-token color in CSS.

Use it to turn solid hex values into translucent overlays, borders and shadows — or to unpack an 8-digit hex value into its rgba() equivalent.

An 8-digit hex value (#394dfe80) carries its own alpha — it takes precedence over the alpha field.

Frequently asked questions

How do I convert HEX to RGBA?

Split the hex value into pairs and convert each pair from hexadecimal to a 0–255 decimal, then append the alpha as a 0–1 value. For #394DFE at 50% opacity: 39 becomes 57, 4D becomes 77, FE becomes 254 — giving rgba(57, 77, 254, 0.5). This tool does it instantly as you type.

Where does the alpha come from?

From the alpha field (0–1) — or from the last two digits of an 8-digit hex value like #394dfe80, which take precedence when present.

What formats are accepted?

#rgb, #rgba, #rrggbb and #rrggbbaa — with or without the leading hash.

Can I convert back?

Yes — the RGBA to HEX converter does the reverse, flattening an rgba() color into 8-digit hex.