brightness(_:)
Returns a filter that applies a brightness adjustment.
Declaration
static func brightness(_ amount: Double) -> GraphicsContext.FilterParameters
- amount:
An amount to add to the pixel’s color components.
Return Value
A filter that applies a brightness adjustment.
Discussion
This filter is different than brightness filter primitive defined by the Scalable Vector Graphics (SVG) specification. You can obtain an effect like that filter using a grayscale(_:) color multiply. However, this filter does match the CIColorControls filter’s brightness adjustment.