I want to use kind of 'disabled' color for my text, using material theme base-600 seemed to be a good pick, however when switching to material-dark using appearance toggle text has too little contrast over background.
Ideally, I would like to use a 'neutral' palette, that would be equivalent to base colors but reversed if theme is set to dark, however, I could not find anything like this on demo pages.
I looked into ThemeService, but it has no property for light/dark, just a theme name.
There are two solutions that come to my mind:
-
Use string.Contains on theme name and apply different base colors based on result, seems simple but I am afraid that timings of color changes might not be consistent with each of the text elements.
-
Be creative with CSS rules, RadzenLayout has this nice property that it includes theme name in class list, I could create my own css class that applies text color using radzen style variables. One downside is, I need separate rule for each theme.
Is there a more elegant way to accomplish this?