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

#16 in Command-line interface

Download history 405024/week @ 2023-12-05 397172/week @ 2023-12-12 326541/week @ 2023-12-19 210991/week @ 2023-12-26 407111/week @ 2024-01-02 450236/week @ 2024-01-09 512730/week @ 2024-01-16 511923/week @ 2024-01-23 516531/week @ 2024-01-30 512485/week @ 2024-02-06 491933/week @ 2024-02-13 578622/week @ 2024-02-20 576662/week @ 2024-02-27 577814/week @ 2024-03-05 560290/week @ 2024-03-12 465355/week @ 2024-03-19

2,292,357 downloads per month
Used in 3,086 crates (165 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–8.5MB
~46K SLoC