Unit content
Alpha channels and compositing
An image can store an alpha value $\alpha$ describing how much a foreground sample covers or contributes to the final pixel.
For foreground color $C_f$, background color $C_b$ and $0\le\alpha\le1$, the basic source-over composite is
$$C=\alpha C_f+(1-\alpha)C_b.$$
This arithmetic should be performed in a color representation appropriate for linear mixing, normally linear-light RGB.
Two common storage conventions differ. Straight alpha stores $C_f$ independently of $\alpha$. Premultiplied alpha stores $\alpha C_f$ directly. Premultiplication makes repeated compositing and filtered image edges behave more naturally because the stored color already represents the foreground's weighted contribution.
Alpha is not necessarily physical transparency. It can represent geometric coverage, material opacity, or a combination chosen by the renderer.
Correct compositing therefore requires knowing both the layer order and the alpha convention; simply averaging RGBA tuples does not implement transparency.