How can I make SwiftUI Text Adapt To Background Color

How can I get SwiftUI text to properly react to different background colors? It seems to me that text will just default to white or black depending on whether you are in light or dark mode but won't take into consideration the background color of their parent. What if you wanted the background color to be user configurable and they select something like yellow, it would work fine in light mode because the text is black, however if the device is in dark mode the text would become white and unreadable on top of bright yellow.

Is there some way I can fix this?

Thanks!
How can I make SwiftUI Text Adapt To Background Color
 
 
Q