terminal-colorsaurus 1.0.3

A cross-platform library for determining the terminal's background and foreground color. It answers the question «Is this terminal dark or light?».
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use cfg_if::cfg_if;

cfg_if! {
    if #[cfg(target_os = "macos")] {
        mod macos;
        pub(crate) use macos::*;
    } else if #[cfg(unix)] {
        mod unix;
        pub(crate) use unix::*;
    } else if #[cfg(windows)] {
        mod windows;
        pub(crate) use windows::*;
    }
}