17 releases (2 stable)

1.0.1 Mar 13, 2024
1.0.0-rc.1 Aug 11, 2023
1.0.0-rc Jul 7, 2023
0.5.1 Mar 23, 2022
0.3.2 Jul 26, 2017

#14 in Command-line interface

Download history 1208124/week @ 2025-03-11 1178260/week @ 2025-03-18 1198759/week @ 2025-03-25 1202254/week @ 2025-04-01 1266139/week @ 2025-04-08 1136640/week @ 2025-04-15 1226566/week @ 2025-04-22 1165818/week @ 2025-04-29 1282144/week @ 2025-05-06 1318657/week @ 2025-05-13 1219695/week @ 2025-05-20 1112322/week @ 2025-05-27 1158325/week @ 2025-06-03 1371266/week @ 2025-06-10 1465385/week @ 2025-06-17 1130785/week @ 2025-06-24

5,322,905 downloads per month
Used in 4,963 crates (240 directly)

MIT/Apache

93KB
1K SLoC

yansi logo  Yansi

A dead simple ANSI terminal color painting library.

Build Status Current Crates.io Version Documentation

Usage

In your Cargo.toml:

[dependencies]
yansi = "1.0"

In your source code:

use yansi::Paint;

println!("Testing, {}, {}, {}!",
    "Ready".bold(),
    "Set".black().on_yellow().invert().italic(),
    "STOP".white().on_red().bright().underline().bold());

> Testing, Ready, Set, STOP!

See the rustdocs for complete usage details.

Features

Why yet another ANSI terminal coloring library? Here are some reasons:

License

yansi is licensed under either of the following, at your option:

Dependencies

~0–7MB
~39K SLoC