Skip to main content

detect_theme

Function detect_theme 

Source
pub fn detect_theme() -> Option<Theme>
Expand description

Detect terminal background and determine appropriate theme Returns None if detection fails or times out

Note: termbg can leave the terminal in a bad state on some terminals (especially macOS Terminal.app). We wrap detection in catch_unwind and flush any stale input afterwards.