use termcolor::{Color, Ansi}; use termcolor_output::colored; fn main() { let mut w: Ansi> = Ansi::new(vec![]); match colored!( w, "{}{}{}{}{}{}{}", bold!(true), underline!(true), bold!(false), fg!(Some(Color::White)), bg!(Some(Color::Black)), reset!(), intense!(true) ) { Ok(_) => print!("{}", String::from_utf8_lossy(&w.into_inner())), Err(_) => {} }; }