Sorry, I hadn’t realised you were using different themes on different devices. I’ll let you know if I find a way to detect the theme in use, but, as I said, think it’s unlikely.
I guess the other ‘clunky’ option is to create two dashboards configured differently for dark and light themes and view the corresponding one as needed? Definitely clunky, but I am trying to think of options for anyone else using a mixture of themes who want the colours to match exactly.
It appears it might be possible, but again clunky, using browser-mod. See the post here.
The only other way I can think it might be possible to do this, is if there’s a way to evaluate whether a variable is set to a specific value e.g. if --card-background-color
changes and can be tested for it’s value.
There is a feature request open for a binary sensor for this exact thing to be included in HA. Feel free to vote for it’s inclusion here.