| Crates.io | lealang_chalk_rs |
| lib.rs | lealang_chalk_rs |
| version | 1.2.1 |
| created_at | 2025-01-30 11:36:52.357158+00 |
| updated_at | 2025-03-16 14:53:50.296041+00 |
| description | A crate which adds colors and styles to your terminal program |
| homepage | |
| repository | https://github.com/mrw1593/chalk_rs |
| max_upload_size | |
| id | 1536260 |
| size | 32,147 |
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!");