Is there a setting that can be read / polled to determine if the global Ubuntu dark mode is enabled or not by the user. I’m writing an app and would like to honour the user’s preference for my UI.
Is there a setting that can be read / polled to determine if the global Ubuntu dark mode is enabled or not by the user. I’m writing an app and would like to honour the user’s preference for my UI.
This is not a fancy solution, but you can read the font color css value of e.g. some label. For dark themes this will (probably) be white(ish) and otherwise black. Same should be possible for backgroud-color and so on.
Python example:
Style Context docs