static let primary: Color
The color to use for primary content.
static let secondary: Color
The color to use for secondary content.
Availability 有効性
Technology
static var accentColor: Color
{ get }
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.
Note 注意
In macOS, SwiftUI applies customization of the accent color only if the user chooses Multicolor under General > Accent color in System Preferences.
The following code renders a Text
view using the app’s accent color:
Text("Accent Color")
.foregroundStyle(Color.accentColor)
static let primary: Color
static let secondary: Color