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 737889/week @ 2024-07-19 750907/week @ 2024-07-26 718828/week @ 2024-08-02 769250/week @ 2024-08-09 800037/week @ 2024-08-16 790696/week @ 2024-08-23 744356/week @ 2024-08-30 802230/week @ 2024-09-06 728240/week @ 2024-09-13 813283/week @ 2024-09-20 776432/week @ 2024-09-27 870858/week @ 2024-10-04 838359/week @ 2024-10-11 860830/week @ 2024-10-18 871576/week @ 2024-10-25 809936/week @ 2024-11-01

3,548,379 downloads per month
Used in 3,880 crates (208 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