#terminal-colors #color #style #terminal #cli #chalk

lealang_chalk_rs

A crate which adds colors and styles to your terminal program

4 stable releases

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

#253 in Command-line interface

Download history 537/week @ 2025-01-28 542/week @ 2025-02-04 83/week @ 2025-02-11 52/week @ 2025-02-18 906/week @ 2025-02-25 946/week @ 2025-03-04 410/week @ 2025-03-11

2,320 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!");

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–29MB
~463K SLoC