Contents

luminanceToAlpha

Returns a filter that sets the opacity of each pixel based on its luminance.

Declaration

static var luminanceToAlpha: GraphicsContext.Filter { get }

Return Value

A filter that applies a luminance to alpha transformation.

Discussion

The filter computes the luminance of each pixel and uses it to define the opacity of the result, combined with black (zero) color components.

See Also

Adjusting opacity