SwiftUI: WHere can I get a list of standard colors?

Viewed 224

In SwiftUI I can assign a color using something like this:

Text("…")
.background(Color.something)

I know that I can select a number of hard-coded colours, as well as my own custom colours.

I want to use the standard colours for MacOS appearance theme (I’m not sure what the correct terminology is for that). In particular, I would like to get the standard text background colour (which in the light appearance is white).

Does SwiftUI have access to these colours, and, if so, where can I find them?

1 Answers

I assume you meant this

Text("…")
.background(Color(NSColor.textBackgroundColor))

And full list is in UI Element Colors

Related