Instance Method

accentColor(_:)

Sets the accent color for the view and the views it contains.

Declaration

func accentColor(_ accentColor: Color?) -> some View

Parameters

accentColor

The color to use as an accent color. If nil, the accent color is the system default.

Discussion

The system uses the accent color for common controls and containers. For example, a button’s label might use the accent color for its text.

See Also

Setting View Colors

func foregroundColor(Color?) -> View

Sets the color that the view uses for foreground elements.