Crate no_color

Source
Expand description

§no_color

Crates.io Crates.io GitHub repo size main docs.rs License

no_color is a zero dependency rust library for detecting if the NO_COLOR environment variable is set.

Note only the existence of the NO_COLOR environment variable is required to be valid, whether the environment variable has value or not.

§Usage

no_color is a library crate which works with Cargo.

§Add to Cargo.toml

To use, add the following to your Cargo.toml dependencies section:

[dependencies]
no_color = "0.2"

or use cargo add:

$ cargo add no_color

Functions§

is_no_color
Function returns true if NO_COLOR environment variable exists, false if not.