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

#18 in Command-line interface

Download history 801026/week @ 2024-12-15 362546/week @ 2024-12-22 473059/week @ 2024-12-29 840357/week @ 2025-01-05 930906/week @ 2025-01-12 810201/week @ 2025-01-19 870663/week @ 2025-01-26 951208/week @ 2025-02-02 1024454/week @ 2025-02-09 1007169/week @ 2025-02-16 1132366/week @ 2025-02-23 1155982/week @ 2025-03-02 1213908/week @ 2025-03-09 1169589/week @ 2025-03-16 1203841/week @ 2025-03-23 1188598/week @ 2025-03-30

4,839,781 downloads per month
Used in 4,529 crates (226 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–6MB
~31K SLoC