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 515915/week @ 2024-01-22 518641/week @ 2024-01-29 506013/week @ 2024-02-05 507761/week @ 2024-02-12 541755/week @ 2024-02-19 589376/week @ 2024-02-26 578070/week @ 2024-03-04 562674/week @ 2024-03-11 561093/week @ 2024-03-18 535707/week @ 2024-03-25 576379/week @ 2024-04-01 554087/week @ 2024-04-08 566367/week @ 2024-04-15 605589/week @ 2024-04-22 575634/week @ 2024-04-29 584804/week @ 2024-05-06

2,358,400 downloads per month
Used in 3,224 crates (174 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