Instance Method

hueRotation(_:)

Applies a hue rotation effect to the view.

Declaration

func hueRotation(_ angle: Angle) -> some View

Parameters

angle

The hue rotation angle to apply to the colors in this view.

Return Value

A view that applies a hue rotation effect to this view.

Discussion

A hue rotation effect shifts all of the colors in a view according to the angle you specify. The following shows two versions of the same image side by side; at left is the original, and at right is a duplicate with its hues rotated by 45 degrees: