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

#13 in Command-line interface

Download history 739728/week @ 2024-11-28 850280/week @ 2024-12-05 840618/week @ 2024-12-12 514047/week @ 2024-12-19 371937/week @ 2024-12-26 727059/week @ 2025-01-02 935026/week @ 2025-01-09 844521/week @ 2025-01-16 850273/week @ 2025-01-23 899026/week @ 2025-01-30 1005519/week @ 2025-02-06 971474/week @ 2025-02-13 1134273/week @ 2025-02-20 1133336/week @ 2025-02-27 1200847/week @ 2025-03-06 982677/week @ 2025-03-13

4,642,706 downloads per month
Used in 4,377 crates (221 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–6.5MB
~31K SLoC