macro_rules! color {
( $style: expr, $str: tt) => { ... };
( $style: expr, $other: expr) => { ... };
}Expand description
Formats a string with a color.
You can also use all the designated color macros (e.g. [red!])

ยงExamples
println!("{}", color!(Color::Red, "This is text"));
println!("{}", red!("This will be the same color"));let string = green!("This text is green");
println!("{string}");
println!("{}", color!(Color::Green, "This text is also green"))println!("{}", red!("This is red"));
printlnc!(red!("This is also red"));
printlnc!(format!("{}, {}.", white!("This is white"), red!("this is red")))Output