RGBA to HEX Converter
Convert RGBA values to 6-digit HEX (opaque) or 8-digit HEX (with alpha). Both outputs update live as you type.
Format: red, green, blue, alpha (0-255, 0-255, 0-255, 0-1). Example: 21, 94, 239, 0.5
All Format Outputs
What Is RGBA to HEX Conversion?
RGBA to HEX conversion translates the red, green, blue and alpha channels into hexadecimal notation. The RGB portion becomes a standard 6-digit HEX code; the alpha becomes an additional 2-digit hex byte appended to produce an 8-digit HEX.
Example Conversions
- rgba(21, 94, 239, 1) →
#155EEF - rgba(21, 94, 239, 0.5) →
#155EEF80 - rgba(255, 0, 0, 0.5) →
#FF000080 - rgba(0, 0, 0, 0) →
#00000000(fully transparent)
How Alpha Converts to Hex
Alpha (0-1) is multiplied by 255, then converted to a 2-digit hex number:
- 0.00 → 00 (transparent)
- 0.25 → 40
- 0.50 → 80
- 0.75 → BF
- 1.00 → FF (fully opaque)