Programmatic way to detect theme (light/dark mode)?
At a glance
The community member who posted the original question is unsure if it is possible to detect the app's light/dark mode from the Python side, as the theme appears to be a frontend property. The comments indicate that there is an open issue for this feature, and a community member has expressed interest in taking on the task. Another community member has noted that the feature has been added in a recent pull request.
I reckon this might not be possible, since theme appears to be a frontend property, but is there a way to detect whether the app is displayed in light/dark mode from the python side?