Function dark_light::detect

source ·
pub fn detect() -> Mode
Expand description

Detect if light mode or dark mode is enabled. If the mode can’t be detected, fall back to Mode::Default.

Examples found in repository?
examples/detect.rs (line 2)
1
2
3
fn main() {
    println!("Current mode: {:?}", dark_light::detect());
}