unpremultiply
Divides the color channels by the alpha, the inverse of premultiply.
A fully transparent color (alpha 0) holds no color, so it gives transparent black. Channels
are clamped to 255 and rounded to 8 bits.
Import
Section titled “Import”Cargo feature color (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
color | Rgba | The premultiplied color. |
Returns
Section titled “Returns”Rgba — The straight color, with the same alpha.
