3 stable releases
1.2.0 | Feb 9, 2025 |
---|---|
1.1.1 | Feb 7, 2025 |
1.1.0 | Jan 30, 2025 |
#247 in Command-line interface
1,148 downloads per month
Used in 2 crates
(via lead_lang_interpreter)
23KB
590 lines
Chalk
A crate for terminal colors and styles
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.red().println(&"This text is red");
chalk.bold().println(&"Now it's red AND bold");
That's an example of basic color. There are three types of color in chalk: BasicChalk, AnsiChalk, and RgbChalk.
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.ansi(56).println(&"Purple-ish");
chalk.rgb(25, 125, 63).println(&"This color is ugly");
Chalk can aldo do styling! Here's an example:
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.bold().println(&"Bold!");
lib.rs
:
A crate for terminal colors and styles
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.red().println(&"This text is red");
chalk.bold().println(&"Now it's red AND bold");
That's an example of basic color. There are three types of color in chalk: BasicChalk, AnsiChalk, and RgbChalk.
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.ansi(56).println(&"Purple-ish");
chalk.rgb(25, 125, 63).println(&"This color is ugly");
Chalk can aldo do styling! Here's an example:
use chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.bold().println(&"Bold!");
Dependencies
~0–38MB
~473K SLoC