RGBA to HEX Converter
Convert RGBA colors (including transparency) to 8-digit HEX format. This converter handles the alpha channel, producing HEX codes in the #RRGGBBAA format for colors with transparency.
Understanding 8-Digit HEX
8-digit HEX extends standard HEX with alpha:
| Format | Structure | Example |
|---|---|---|
| 6-digit | #RRGGBB | #FF0000 (red) |
| 8-digit | #RRGGBBAA | #FF000080 (50% red) |
Alpha Value Conversion
| RGBA Alpha | HEX Alpha | Opacity |
|---|---|---|
| 1.0 | FF | 100% |
| 0.75 | BF | 75% |
| 0.5 | 80 | 50% |
| 0.25 | 40 | 25% |
| 0 | 00 | 0% |
RGBA to HEX Examples
| RGBA | 8-Digit HEX |
|---|---|
| rgba(255, 0, 0, 1) | #FF0000FF |
| rgba(0, 0, 255, 0.5) | #0000FF80 |
| rgba(0, 0, 0, 0.8) | #000000CC |
| rgba(255, 255, 255, 0.1) | #FFFFFF1A |
Browser Support
8-digit HEX is supported in all modern browsers. For older browsers, use RGBA format as fallback.
``css
.overlay {
background-color: rgba(0, 0, 0, 0.5);
background-color: #00000080;
}
``
Use this converter to translate RGBA colors with transparency to compact 8-digit HEX format.