colored 2.1.0

The most simple way to add colors in your terminal
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate colored;
use colored::*;

fn main() {
    // the easy way
    "blue string yo".color("blue");

    // this will default to white
    "white string".color("zorglub");

    // the safer way via a Result
    let color_res = "zorglub".parse(); // <- this returns a Result<Color, ()>
    "red string".color(color_res.unwrap_or(Color::Red));
}