How can one dynamically set the text color based on the background color of a component using Material-UI API?
If component A has a light background, then the text should be dark. For component B with a black background, the text should be light.
(I have successfully achieved this using the tinyColor API for individual components, but I'm seeking a more universal solution)
Thank you!