Hex to RGBA Converter screenshot

Hex to RGBA Converter

Turn a hex colour into rgba(), with the red, green and blue channels and the alpha as a percentage. Three, four, six and eight digits all work.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What the hex to RGBA converter reports

A hex code stores three bytes — red, green and blue — and the four- and eight-digit forms add a fourth byte for alpha, where 00 is invisible and ff is opaque. This page reads all four lengths with or without the leading hash, prints the channels as numbers, and then writes the same colour three ways: the rgba() function, the six-digit hex and the eight-digit hex that keeps the alpha. The alpha control is only used when the hex you pasted has no alpha byte of its own, so pasting #2563eb80 does not quietly overwrite the 50% the code already carries. Channels are rounded to the nearest byte, because a screen cannot paint a fraction of one.

How to use it

Hex to RGBA Converter: paste the hex colour into the box above, set Alpha per cent (used when the hex has no alpha), default "100", and press Run to get the RGBA value below.

Worked example

Input:

#2563eb

Output:

rgba(37, 99, 235, 1)
Hex: #2563eb
Hex with alpha: #2563ebff
RGB: 37, 99, 235
Alpha: 100%

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads hex colour and returns RGBA value; reloading the page discards both.

A hex code stores three bytes — red, green and blue — and the four- and eight-digit forms add a fourth byte for alpha, where 00 is invisible and ff is opaque. This page reads all four lengths with or without the leading hash, prints the channels as numbers, and then writes the same colour three ways: the rgba() function, the six-digit hex and the eight-digit hex that keeps the alpha. The alpha control is only used when the hex you pasted has no alpha byte of its own, so pasting #2563eb80 does not quietly overwrite the 50% the code already carries. Channels are rounded to the nearest byte, because a screen cannot paint a fraction of one.

Turn a hex colour into rgba(), with the red, green and blue channels and the alpha as a percentage. Three, four, six and eight digits all work.

How to use it

Hex to RGBA Converter: paste the hex colour into the box above, set Alpha per cent (used when the hex has no alpha), default "100", and press Run to get the RGBA value below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads hex colour and returns RGBA value; reloading the page discards both.

What to Expect

Best for

  • Converting hex colour to RGBA value when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

#2563eb

Sample output

rgba(37, 99, 235, 1) Hex: #2563eb Hex with alpha: #2563ebff RGB: 37, 99, 235 Alpha: 100%

Frequently asked questions

How do I use the hex to rgba converter?

Hex to RGBA Converter: paste the hex colour into the box above, set Alpha per cent (used when the hex has no alpha), default "100", and press Run to get the RGBA value below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.