How do I create a local variable with specifically the dark mode color in SwiftUI. I am trying to avoid specifying the color scheme of each view to be dark to get the dark mode color.
For example in UIKit, I can get the dark mode color with this code
let traitCollection = UITraitCollection(userInterfaceStyle: .dark)
let darkModeBlueUIColor = UIColor.systemBlue.resolvedColor(with: traitCollection)
I know I can convert from a UIColor, but I want to specify it only using SwiftUI so it works on all platforms.
let darkModeBlueSwiftuiColor = Color(darkModeBlueUIColor)
I would like to do something like this involving a helper function
let darkModeBlueColor = Color.blue.darkModeColor