Description
Dark or light desktop mode can be detected from command-line scripts. It is useful for terminal prompts, scripts, and small tools that want to adapt colors to the current theme.
Theme detection is environment-dependent. Provide fallbacks when running over SSH, in minimal window managers, or in desktop sessions that do not expose a standard preference.