extern crate colored_truecolor; use colored_truecolor::*; fn main() { // this will be yellow if your environment allow it println!("{}", "some warning".yellow()); // now , this will be always yellow colored_truecolor::control::set_override(true); println!("{}", "some warning".yellow()); // now, this will be never yellow colored_truecolor::control::set_override(false); println!("{}", "some warning".yellow()); // let the environment decide again colored_truecolor::control::unset_override(); }