RGBA ↔ HEX Converter

Includes 8-digit hex for alpha

Type `rgba(255, 122, 0, 0.5)` or `#ff7a0080` and get the other. Alpha is first-class: below 1 you get 8-digit hex instead of silently dropping it, which is the usual bug on converters that only know `#rrggbb`.

Private by design. Colour math runs in this tab — nothing is sent to a server.

FreeNo sign-upRuns in your browser

How to convert RGBA to HEX

  1. Enter channels or paste a string. R/G/B 0–255, A 0–1, or a hex / rgba() string in the two fields.
  2. Read both hexes. 6-digit is the opaque colour. 8-digit keeps alpha.
  3. Copy the one you need. hex6, hex8, or the rgba() form.

Frequently Asked Questions

What is 8-digit hex?
#rrggbbaa. The last two digits are alpha, 00 transparent to ff opaque. CSS has accepted this for years.
Why did #ff000080 become 0.502, not 0.5?
128/255 is 0.50196…. The converter does not pretend a byte is a round tenth.
Is this the same as the color picker?
The color picker is an eyedropper plus HSL harmonies. This page is the dedicated rgba() ↔ hex landing, including alpha.

Use Cases

  • Turn a Figma rgba() into an 8-digit hex for CSS
  • See what alpha 0.4 is as a byte
  • Paste a hex and get rgb()/rgba() back
T
ALL TOOLS · THE CATALOG
477 single-purpose tools · no sign-up
File-processing tools run in your browser. Network and device requirements are described on each tool.