Contents

contrast(_:)

Returns a filter that applies a contrast adjustment.

Declaration

static func contrast(_ amount: Double) -> GraphicsContext.Filter

Parameters

  • amount:

    An amount to adjust the contrast. A value of zero leaves the result completely gray. A value of one leaves the result unchanged. You can use values greater than one.

Return Value

A filter that applies a contrast adjustment.

Discussion

This filter is equivalent to the contrast filter primitive defined by the Scalable Vector Graphics (SVG) specification.

See Also

Changing brightness and contrast