Colourful
A lightweight, fast, and easy-to-use library for creating coloured strings with ANSI
Ergonomics and speed should not be mutually exclusive, let's look at some examples
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
Features
- No other dependencies
- Allocation free
- Blazingly fast
- Does not emit colours when piping to a file
- Respects
NO_COLORandFORCE_COLOR - Ability to colour and style any type that implements
DisplayorDebug
Usage
- Add the dependency to your crate
- Import
colourful::ColourBrush - You're good to go!
no_std
The base crate relies on reading environment variables to abide by NO_COLOR, and FORCE_COLOR and not print colours when piping. The crate should be able to compile with no_std without you needing to do anything, but these features won't be available