Skip to main content

is_dark_resolved

Function is_dark_resolved 

Source
pub fn is_dark_resolved(resolved: &ResolvedThemeVariant) -> bool
Expand description

Derive is_dark from a ResolvedThemeVariant’s background lightness.

Returns true when the background lightness is below 0.5. This is a convenience for callers that do not have an explicit dark-mode flag. Some presets (e.g. solarized, gruvbox) have borderline values where the auto-detected result may differ from the user’s intent.