hel-colored
ANSI string colorizer and styler
Features
- Lazy (no-alloc, no-copy, until needed, e.g.
to_stringcalled) - Made with performance in mind
- Only RGB(TrueColor) support (no default CLI colors)
- No nested checks by default, which leads up to 2x performance.
Examples
Simply by
"Hello World!".bold.blue.underline;
Nested with "nested" feature
cargo add hel-colored -F nested
let blue_text: = "blue text".blue;
let green_blue_green_text: = format!.green;
// Better to call `to_string` above
println!;
Or with builder
let builder: ANSIStringBuilder = new.bold.underline.orange;
let str1 = builder.build;
let str2 = builder.build;
println!
How to install
cargo add hel-colored