/

RGBA to HEX Converter

Processed Client Side

Convert RGBA color values — alpha included — into an 8-digit #RRGGBBAA hex code, with a live transparency-aware preview.

RGBA values
rgba(124, 92, 255, 0.8)
Red
Green
Blue
Alpha
HEX output
#RRGGBBAA
8-digit hex (with alpha)#7c5cffcc
Without alpha#7c5cff

Bookmark this tool now — skip the search next time you need it.

About RGBA to HEX converter

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

Convert an RGBA colour, alpha channel included, into an eight-digit #RRGGBBAA hex code. The conversion trips people up because the two formats express transparency differently: rgba() takes a decimal fraction from 0 to 1, while hex takes two more hex digits from 00 to FF. Half opacity is 0.5 in rgba and 80 in hex — not 50 — which is the mistake almost everyone makes at least once. The preview renders the result over a checkerboard so you can actually judge the transparency rather than guessing at it. Alongside the eight-digit code the tool also shows the plain six-digit hex for the same colour with the alpha stripped off, which is what you need the moment a design calls for the solid version of a translucent tint.

Key features

  • Per-channel sliders for red, green, blue, and alpha
  • Outputs eight-digit #RRGGBBAA hex, the modern CSS form for colour with alpha
  • Transparency-aware preview rendered over a checkerboard
  • Handles the decimal-to-hex alpha conversion, which is the easy part to get wrong by hand
  • Shows the opaque six-digit hex for the same colour alongside the eight-digit one, so you get the solid variant without a second conversion
  • Native colour picker for setting the red, green, and blue part visually, with alpha kept on its own slider
  • Live rgba() notation printed next to the picker, so either syntax is available to copy
  • Live update as you move any channel
  • One-click copy of the hex result
  • Runs entirely in your browser

How to use it

  1. Set the red, green, and blue channels with the sliders, or click the swatch to pick the colour visually.
  2. Set the alpha value between 0 and 1.
  3. Check the preview against the checkerboard to judge the transparency.
  4. Copy the eight-digit hex code.

Tips & common mistakes

  • Alpha is 0 to 1 in rgba() and 00 to FF in hex. 50% opacity is 0.5 or 80 — writing 50 in the hex gives you about 31% instead.
  • Eight-digit hex is supported by every browser still in support, so there is no compatibility reason left to prefer rgba() notation.
  • A translucent colour composites differently over every background it lands on. When the element sits on a known opaque background, a solid colour is more predictable.
  • Transparency and contrast interact badly for text. Always check the effective contrast against the actual background with the Colour Contrast Checker.
  • Prefer opacity on a colour rather than on the element when only the background should fade — the opacity property fades the text and borders too.
  • The common alpha values in hex are worth memorising: 80 is 50%, CC is 80%, and 1A is 10%.
  • Two hex digits give 256 alpha steps, which is the same resolution browsers use internally, so nothing is lost in the conversion itself — the only rounding you will notice comes from converting back and forth repeatedly.
  • Four-digit shorthand (#RGBA) exists too and expands by doubling each digit, so #F00A is #FF0000AA — handy to recognise, but the long form is clearer to read in a stylesheet.

Related tools

Browse all 19 Frontend / CSS tools

Frequently asked questions

9

Enter the Red, Green, Blue, and Alpha values. The tool outputs an #RRGGBBAA hex code where the final two digits encode the opacity, plus the opaque 6-digit hex.

Alpha is scaled from 0–1 to 00–FF. For example an alpha of 1 is FF (fully opaque), 0.5 is roughly 80, and 0 is 00 (fully transparent).

Yes — #RRGGBBAA hex is supported in all modern (evergreen) browsers. For very old browsers, use the rgba() notation instead.

The checkerboard shows through the transparent parts of the color so you can judge exactly how opaque your chosen alpha looks.

80, not 50. Alpha runs 0 to 1 in rgba() but 00 to FF in hex, so writing 50 gives you about 31% instead. CC is 80% and 1A is 10%.

Yes. Every browser still in support handles #RRGGBBAA, so there is no remaining compatibility reason to prefer rgba() notation.

A solid colour is more predictable when the element sits on a known background, because a translucent one composites differently over everything it lands on.

Transparency lowers effective contrast against whatever is behind it. Check the real pair with the Colour Contrast Checker rather than trusting the nominal colour.

Alpha fades only that colour. The opacity property fades the entire element including its text and borders, which is rarely what you want for a background.