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

#19 in Command-line interface

Download history 2164985/week @ 2025-12-09 2070027/week @ 2025-12-16 1132239/week @ 2025-12-23 1291419/week @ 2025-12-30 2166915/week @ 2026-01-06 2253092/week @ 2026-01-13 2470726/week @ 2026-01-20 2431605/week @ 2026-01-27 2619954/week @ 2026-02-03 2645413/week @ 2026-02-10 2487505/week @ 2026-02-17 2571544/week @ 2026-02-24 3232785/week @ 2026-03-03 3382096/week @ 2026-03-10 3068500/week @ 2026-03-17 2928238/week @ 2026-03-24

13,061,155 downloads per month
Used in 7,206 crates (282 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–1.7MB
~32K SLoC