LumaColorFilter

class LumaColorFilter

LumaColorFilter multiplies the luma of its input into the alpha channel, and sets the red, green, and blue channels to zero.

LumaColorFilter (r,g,b,a) = {0,0,0, a * luma(r,g,b)}

This is similar to a luminanceToAlpha feColorMatrix, but note how this filter folds in the previous alpha, something an feColorMatrix cannot do.

feColorMatrix(luminanceToAlpha; r,g,b,a) = {0,0,0, luma(r,g,b)}

(Despite its name, an feColorMatrix using luminanceToAlpha does actually compute luma, a dot-product of gamma-encoded color channels, not luminance, a dot-product of linear color channels. So at least LumaColorFilter and feColorMatrix+luminanceToAlpha agree there.)

Methods

Make

__init__

Methods

static LumaColorFilter.Make() skia.ColorFilter
LumaColorFilter.__init__(*args, **kwargs)