Alpha/Opacity Colour Converter
Translate between common CSS alpha colour forms and flatten the result onto a chosen solid background entirely in your browser.
A QUICK WALKTHROUGH
How to use this tool
- Enter a base HEX colour, opacity, and opaque background, or paste a supported alpha colour.
- Read an existing value when needed, then convert the current base colour and opacity.
- Copy the HEX8, rgba(), alpha-byte, or flattened colour result.
Formula and scope
HEX8 appends an 8-bit alpha byte to #RRGGBB. Alpha byte = round(opacity ÷ 100 × 255). The displayed solid colour over an opaque background is round(alpha × foreground + (1 − alpha) × background) for each sRGB channel. This is a channel-value estimate for one flat background, not colour-managed compositing or a contrast result.
Local values only
All parsing and arithmetic run locally. No colour value is uploaded or saved.
GOOD TO KNOW
Common questions
Where is alpha stored in HEX8?
In the final two hexadecimal digits: #RRGGBBAA.
Why does the flattened colour depend on the background?
A translucent foreground contributes only part of each visible channel; the rest comes from the background.