HEX to RGBA Converter
Convert HEX colors to RGBA for CSS transparency, overlays, shadows, disabled states, and UI surfaces. Paste a HEX code or choose a color, then adjust the alpha value.
Enter a valid 3, 4, 6, or 8 digit HEX color.
When to Use RGBA Output
RGBA is useful when the color itself stays the same but the opacity changes. Use it for overlays, focus rings, translucent buttons, shadow colors, disabled states, and layered interface surfaces.
HEX to RGBA Examples
| HEX | Alpha | RGBA | Use Case |
|---|---|---|---|
| #000000 | 0.50 | rgba(0, 0, 0, 0.5) | Modal overlay |
| #FFFFFF | 0.80 | rgba(255, 255, 255, 0.8) | Frosted panel |
| #1E90FF80 | 0.50 | rgba(30, 144, 255, 0.5) | Selected state |
How HEX Alpha Works
Standard HEX uses red, green, and blue pairs: #RRGGBB.
Eight-digit HEX adds an alpha pair at the end: #RRGGBBAA.
The alpha pair is converted from hexadecimal to a decimal opacity between 0 and 1.
Frequently Asked Questions
Can HEX colors include transparency?
Yes. Eight-digit HEX uses the last two characters for alpha transparency, such as #00000080 for 50% black.
Should I use RGBA or 8-digit HEX in CSS?
Both work in modern browsers. RGBA is often easier to read because the alpha value is written directly as a decimal.
Why does 50% opacity become 80 in HEX?
HEX alpha uses a 0-255 byte. Half opacity is about 128, which is 80 in hexadecimal.
Related Color Tools
Open the next tool for this color task.
RGBA to HEX Converter
converterConvert rgba() colors into 6-digit or 8-digit HEX.
Hex to RGB Converter - Free Online Tool
converterTurn HEX colors into RGB values for CSS and design tools.
RGB to Hex Converter - Free Online Tool
converterConvert RGB or RGBA input into a compact HEX code.
Color Contrast Checker
converterCheck text and background colors against WCAG ratios.