Function piet::util::unpremul

source ·
pub fn unpremul(x: u8, a: u8) -> u8
Expand description

If x is a single (non-alpha) channel of a premultiplied color and a is the alpha channel, returns the corresponding channel of the unpremultiplied version of the color.