A lightweight library for printing colored text on an UNIX terminal environment.
use colored_text::{esthetics, ColoredString};
let x = ColoredText::text("Hello, World")
.style(esthetics::Style::Underline) // define underline style
.color(esthetics::Color::Cyan); // use cyan color
println!("{}", x);
It is possible to inject a string that will produce non desirable behaviour.
use colored_text::{esthetics, ColoredString};
let c = ColoredText::text("\x1b[9;31mabc") // overwrites esthetics::Style:Normal and esthetics::Color::White
.style(esthetics::Style::Normal)
.color(esthetics::Color::White);