Skip to content

Alpha and how it blends

The checkerboard behind each row shows through wherever a colour is transparent. alpha() sets it outright; clearer() and opaquer() nudge it by a ratio, and — because each transform mutates — every step below clones the previous swatch before nudging it again. The last row mixes the same two colours at the same 50/50 weight twice: once both fully opaque, once with one of them mostly transparent. mix() folds alpha into the weighting, so the transparent pairing leans hard toward the opaque colour instead of splitting the difference.