Ansi colors



examples/other/ansi-colors/Cargo.toml
[package]
name = "ansi-colors"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ansi_term = "0.12.1"

examples/other/ansi-colors/src/main.rs
use ansi_term::Colour::{Blue, Green, Red};

fn main() {
    println!("Hello, world!");
    println!("{}", Blue.bold().paint("blue"));
    println!("{}", Green.dimmed().paint("green"));

    println!("Hello {} sky and {} grass!", Blue.bold().paint("blue"), Green.bold().paint("green"));
    println!("{}", Red.bold().paint("red"));
}