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

#12 in Command-line interface

Download history 795617/week @ 2024-09-21 796391/week @ 2024-09-28 861668/week @ 2024-10-05 851530/week @ 2024-10-12 868067/week @ 2024-10-19 836315/week @ 2024-10-26 838031/week @ 2024-11-02 839066/week @ 2024-11-09 851242/week @ 2024-11-16 717857/week @ 2024-11-23 807243/week @ 2024-11-30 886464/week @ 2024-12-07 804629/week @ 2024-12-14 366159/week @ 2024-12-21 467091/week @ 2024-12-28 675357/week @ 2025-01-04

2,456,297 downloads per month
Used in 4,113 crates (212 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
~38K SLoC