Previously to decide the icon color in the status bar we just checked the dark/light theme like so:
Well now in Big Sur the status bar color is determined by the desktop wallpaper so the old implementation does not work anymore. By Googling I have found all kind of hacks from detecting pixel colors to checking appearance name of menu button
but all of these seem to be hacks that don't work reliably. Main issue is that now user can have different wallpaper for every single display. This means that there has to be some kind of automatic way to switch the icon based on the status bar color.
Has any one found any solution for this issue? Any tips are highly appreciated.