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

#16 in Command-line interface

Download history 1632434/week @ 2025-10-16 1780415/week @ 2025-10-23 1784476/week @ 2025-10-30 1820083/week @ 2025-11-06 1880015/week @ 2025-11-13 2108561/week @ 2025-11-20 1743862/week @ 2025-11-27 2062192/week @ 2025-12-04 2136916/week @ 2025-12-11 1739184/week @ 2025-12-18 1093088/week @ 2025-12-25 1624656/week @ 2026-01-01 2274079/week @ 2026-01-08 2275328/week @ 2026-01-15 2527649/week @ 2026-01-22 2489098/week @ 2026-01-29

9,961,903 downloads per month
Used in 6,423 crates (274 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–2MB
~35K SLoC