RGBA to RGB on a background
Enter the color, its alpha and the background (white by default) to get the equivalent solid color.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter red r, green g, blue b, alpha and background hex.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Standard alpha compositing: channel = round(alpha × color + (1 − alpha) × background) for R, G and B.
Example
Inputs: Red R = 255, Green G = 0, Blue B = 0, Alpha = 0.4 0 to 1, Background HEX = #FFFFFF. Result: HEX code: #FF9999; Red R: 255; Green G: 153.
#FFFFFF
#FF9999
Limits and caveats
- Blends in sRGB the way browsers do, not in linear light.
- The result only matches over the background you entered.
Questions about this tool
When do I need RGBA to RGB?
In email, print and apps without transparency, where you need the solid color that looks the same.
Why does another background change the result?
A transparent color takes part of the background, so 40% red looks pink over white and dark over black.
What is 50% black over white?
0.5 × 255 = 127.5, which rounds to 128, giving gray #808080.
