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

#11 in Command-line interface

Download history 814202/week @ 2024-08-19 783890/week @ 2024-08-26 754918/week @ 2024-09-02 800871/week @ 2024-09-09 723490/week @ 2024-09-16 799766/week @ 2024-09-23 804793/week @ 2024-09-30 861119/week @ 2024-10-07 848719/week @ 2024-10-14 868463/week @ 2024-10-21 833159/week @ 2024-10-28 837461/week @ 2024-11-04 854457/week @ 2024-11-11 843667/week @ 2024-11-18 709901/week @ 2024-11-25 816197/week @ 2024-12-02

3,260,642 downloads per month
Used in 4,333 crates (209 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
~36K SLoC