Instance Method

brightness(_:)

Brightens this view by the specified amount.

Declaration

func brightness(_ amount: Double) -> some View

Parameters

amount

A value between 0 (no effect) and 1 (full white brightening) that represents the intensity of the brightness effect.

Return Value

A view that brightens this view by the specified amount.

Discussion

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 brightness set to 0.6:

See Also

Applying Graphical Effects to a View

func opacity(Double) -> View

Sets the transparency of this view.

Beta
func contrast(Double) -> View

Sets the contrast and separation between similar colors in this view.

Beta
func colorInvert() -> View

Inverts the colors in this view.

Beta
func colorMultiply(Color) -> View

Adds a color multiplication effect to this view.

Beta
func blendMode(BlendMode) -> View

Sets the blend mode for compositing this view with overlapping views.

Beta
func compositingGroup() -> View

Wraps this view in a compositing group.

Beta
func drawingGroup(opaque: Bool, colorMode: ColorRenderingMode) -> View

Composites this view’s contents into an offscreen image before final display.

Beta
func saturation(Double) -> View

Adjusts the color saturation of this view.

Beta
func grayscale(Double) -> View

Adds a grayscale effect to this view.

Beta
func hueRotation(Angle) -> View

Applies a hue rotation effect to this view.

Beta
func luminanceToAlpha() -> View

Adds a luminance to alpha effect to this view.

Beta

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software