Simple Colors
This crate provides simple macros for formatting strings with colors, backgrounds and styles like bold, italic and underlined. The crate does not use any external dependencies.
Installing
Add the following line to your Cargo.toml file:
[]
= "1"
Overview
Colors
You can style text with colors:
use ;
println!;
printlnc!;
printlnc!
Output:
The available colors:
- black
- white
- yellow & light_yellow
- red & light_red
- cyan & light_cyan
- blue & light_blue
- magenta & light_magenta
- green & light_green
- dark_grey & grey
Backgrounds
You can also add backgrounds:
use ;
printlnc!;
Styles
You can also make your text bold, italic or underlined.
use bold;
printlnc!;
Combining styles
You can combine all of the different macros to style your text.
Custom styles
You can also specify custom styles:
use ;
println!
Contributing
Everything should be covered in this crate. If you find a bug, feel free to open an issue and then making a pull request (if you know how to fix the bug). If you can think of improvements, they are also always welcome.
License
This crate is licensed under the MIT License or the Apache-2.0 license.