Module color.alpha

Straight-alpha and premultiplied color values.

Use Alpha when opacity accompanies a computational color value without changing its color-space coordinates. Use Premultiplied for linear-light compositing. Conversion between the two representations is always explicit.

Functions

NameDescription
premultiply(value) Prepares straight linear-light sRGB for premultiplied-alpha compositing.
unpremultiply(value) Converts a premultiplied result back to straight linear-light sRGB.

Structs

NameDescription
Alpha Stores a computational color together with straight alpha.
Premultiplied Stores premultiplied linear-light sRGB and its alpha.