Pealn
Pealn is a Rust library for printing coloured text to make your CLI app beautiful as a Peacock
Features
- Easy to use Apply modification inside string
- Pre defined Colors Common colors are already defined
- Text Styles Add Styles like , bold,italic,underline and more
- Use RGB colors Apply colors using RGB value
Installation
Add Pealn to your Cargo.toml:
[]
= "0.1"
Add Pealn using Cargo CLI:
cargo add Pealn
Available macros to print colored and styled text
pea!; // to print on same line
pealn!; // to print on next line
print new line with colored and styles
Format
Available Colors
red, green, blue, yellow, cyan,purple , magenta, black, white
Available Styles
bold, dim, italic, underline, blink, reverse, hidden, strikethrough
*Note:Some styles are not supported on every console , like blink,reverse and dim
Examples
To print text with foreground
use ;
pealn!;
let name = "Subham Shaw";
pealn!;
you can use RGB color
use ;
pealn!;
To print text with foreground and background
use ;
pealn!;
To print text with styles
use ;
pealn!;
To print text with color and styles
use ;
//here order of colors and styles does not matter,
//first color will be used as foreground and second as background
pealn!;
Pealn makes your CLI apps more colorful and expressive!