Type Property 型プロパティ

accentColor

A color that reflects the accent color of the system or app.

Declaration 宣言

static var accentColor: Color { get }

Discussion 議論

The accent color is a broad theme color applied to views and controls. You can set it at the application level by specifying an accent color in your app’s asset catalog.

The following code renders a Text view using the app’s accent color:


Text("Accent Color")
    .foregroundStyle(Color.accentColor)

See Also 参照

Getting Semantic Colors