#style #chalk #terminal #cli #color

lealang_chalk_rs

A crate which adds colors and styles to your terminal program

4 stable releases

1.2.1 Mar 16, 2025
1.2.0 Feb 9, 2025
1.1.1 Feb 7, 2025
1.1.0 Jan 30, 2025

#386 in Command-line interface

Download history 623/week @ 2025-01-29 469/week @ 2025-02-05 73/week @ 2025-02-12 51/week @ 2025-02-19 912/week @ 2025-02-26 989/week @ 2025-03-05 371/week @ 2025-03-12 987/week @ 2025-03-19 53/week @ 2025-03-26 176/week @ 2025-04-02 6/week @ 2025-04-09

1,233 downloads per month
Used in 2 crates (via lead_lang_interpreter)

Custom license

23KB
584 lines

Chalk

Video Demo

A crate for terminal colors and styles

use lealang_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 lealang_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 lealang_chalk_rs::Chalk;
let mut chalk = Chalk::new();
chalk.bold().println(&"Bold!");

Dependencies

~0–29MB
~462K SLoC