Looking at Apple's Color Guidelines and taking into account that building my app to work for both light/dark modes I run into an issue where I want to use colors for statuses: red and green. I want to avoid declaring custom colors and I try to use the default ones that adjust for the selected appearance. Unfortunately I noticed that the Color.green
does not work well on the default light background of my view (.background(Color (.windowBackgroundColor))
) because there is not enough contrast.
I noticed that Apple also lists "Accessible" versions of those colors but these are probably managed dynamically.
My question:
Is there a way to programatically force my app to use the accessible version of a Color (e.g. green)?
Thanks