Detect Dark Mode changes

on iOS there is an event (appearanceChanged) - or something like that - is there something similar for web?

I can use a color group in most cases, but I have a logo that needs to switch from white to black so it remains visible. And I’d prefer not to have to poll for changes in a timer.

Any solution?

There is. Look at the WebSession.AppearanceChanged-Event.

Awesome, thanks. I didn’t think to look there.

1 Like