HEX to RGBA Converter
Enter a HEX code and choose an opacity to get an rgba() value for CSS, plus the matching 8-digit HEX (#RRGGBBAA).
rgba(109, 70, 211, 0.5)CSS 4
rgb(109 70 211 / 50%)HEX8
#6D46D380How to use it
- Type a HEX code.
- Set alpha with the slider or type 0-1 (0 = fully transparent, 1 = solid).
- Copy rgba() or the 8-digit HEX.
How RGBA and 8-digit HEX store opacity
rgba(109, 70, 211, 0.5) adds a fourth value, alpha, from 0 to 1. Modern CSS also accepts rgb(109 70 211 / 50%). In 8-digit HEX the last pair is alpha from 00 to FF: alpha × 255, rounded, in base 16 (0.5 → 128 → 80, so #6D46D380).
Frequently asked questions
Is 8-digit HEX supported by browsers?
Yes, every current browser supports #RRGGBBAA (CSS Color Module Level 4). rgba() works in older browsers too.
Is HEX the same color as RGB?
Yes. A 6-digit HEX code is the same three RGB numbers written in base 16: two digits each for red, green and blue. Converting between them never changes the color.