pub fn detect_system_dark_mode() -> boolExpand description
Detect whether the operating system is configured for dark mode.
Heuristics per platform:
- macOS:
defaults read -g AppleInterfaceStyle→ “Dark” means dark mode. - Linux: checks
$GTK_THEMEfor a-darksuffix, then falls back togsettings get org.gnome.desktop.interface color-scheme. - Windows: reads
AppsUseLightThemefrom the registry viareg query.
Returns true (dark) when detection fails or the platform is unrecognized.