About this tool
Get the #RRGGBBAA equivalent of an rgba() colour, or the solid colour it produces over a white or black background.
How to use the RGBA to HEX Converter
- Enter the red, green, blue and alpha.
- The result updates instantly, with the working shown underneath.
- Use Copy to grab a result, or Reset to start again.
How it works
Alpha (0–1) is scaled to 0–255 and written as two hex digits. Flattening blends the colour with the background: result = colour × α + background × (1 − α).
Examples
Semi-transparent blue
rgba(17, 45, 147, 0.5) → #112D9380. Over white it looks like #8896C9.
Benefits and use cases
- 8-digit hex (#RRGGBBAA) for modern CSS
- Flattened solid colour for tools without alpha support
- Exact rounding rules shown
Frequently asked questions
Do all browsers support 8-digit HEX?
All current major browsers do.
Do all browsers support 8-digit hex?
All current major browsers support #RRGGBBAA in CSS. Some older design tools and email clients do not — use the flattened colour there.