grayscale(_:)
Returns a filter that applies a grayscale adjustment.
Declaration
static func grayscale(_ amount: Double) -> GraphicsContext.FilterParameters
- amount:
An amount that controls the effect. A value of one makes the image completely gray. A value of zero leaves the result unchanged. Other values apply a linear multiplier effect.
Return Value
A filter that applies a grayscale adjustment.
Discussion
This filter is equivalent to the grayscale filter primitive defined by the Scalable Vector Graphics (SVG) specification.