I'm trying to utilize the light & dark mode in SwiftUI, but I am struggling to get an elevated color that fits for both light and dark mode. Such as the SystemGray(0-6) colors that Apple showcased.
I have attempted to use .background(Color.primary/secondary) on my VStack or HStack and it doesn't seem to get a nice color. It's either Black or Dark Gray. There doesn't seam to be the tertiary or quaternary colors that Apple talked about. How would I get the color of the app to match the health app? Light grey screen background with white backgrounds for the buttons in light mode and then in dark mode have a black background and dark gray buttons?
Currently, in my code below, I am using a blue background just for testing as primary/secondary does not work. Has anyone found a way to get this working properly?
VStack
{
Text("8:20").fontWeight(.semibold).font(.system(size: 80)).foregroundColor(.primary)
Text("Hours worked").font(.body).foregroundColor(.secondary)
}
.padding()
.background(Color.blue)
.cornerRadius(15)
.shadow(radius: 10)