prettypretty.darkmode
- prettypretty.darkmode.is_dark_mode() None | bool [source]
Determine whether the operating system is in dark mode.
- Returns:
True
for dark mode,False
for light mode, andNone
if the mode could not be determined.
The implementation builds on answers to this StackOverflow question and the darkdetect package. The latter seems both over- and under-engineered. In contrast, this module provides the one interesting bit, whether the system is in dark mode, if available and nothing else.