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

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

#904 in Command-line interface

Download history

1,249 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–28MB
~457K SLoC