Contents

grayscale(_:)

Adds a grayscale effect to the view.

Declaration

func grayscale(_ amount: Double) -> some VisualEffect

Parameters

  • amount:

    The intensity of grayscale to apply from 0.0 to less than 1.0. Values closer to 0.0 are more colorful, and values closer to 1.0 are less colorful.

Return Value

An effect that reduces the intensity of colors in the view.

Discussion

A grayscale effect reduces the intensity of colors in the view.

See Also

Adjusting Color