Expand description
Return the light of the terminal background, which is a value
between 0 (black) and 1 (white).
28
29
30
31
32
33
34
pub fn read() -> Self {
match luma() {
Ok(luma) if *luma > 0.6 => Self::Light,
Ok(_) => Self::Dark,
_ => Self::Unknown,
}
}