RGBA to HEX Converter
Enter an rgba() value to get the 8-digit HEX with alpha, and the solid HEX color it produces over the background you choose.
#6D46D380Solid
#B6A3E9How to use it
- Type an rgba() value, for example rgba(109, 70, 211, 0.5).
- Choose the background it sits on (white by default).
- Copy the 8-digit HEX or the flattened 6-digit HEX.
Flattening a transparent color
A transparent color has no single solid equivalent: it depends on what is behind it. Over a background, each channel is mixed as result = alpha × color + (1 − alpha) × background. For rgba(109, 70, 211, 0.5) over white: R = 0.5×109 + 0.5×255 = 182, G = 162.5 → 163, B = 233 → #B6A3E9.
Frequently asked questions
Which result should I use?
Use the 8-digit HEX when you need real transparency. Use the flattened HEX when the background never changes, for example in an email or a design file without transparency.
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.