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 778253/week @ 2025-01-03 946604/week @ 2025-01-10 828367/week @ 2025-01-17 852346/week @ 2025-01-24 924574/week @ 2025-01-31 1019856/week @ 2025-02-07 972441/week @ 2025-02-14 1150252/week @ 2025-02-21 1150393/week @ 2025-02-28 1200588/week @ 2025-03-07 1185607/week @ 2025-03-14 1178638/week @ 2025-03-21 1194607/week @ 2025-03-28 1255159/week @ 2025-04-04 1199456/week @ 2025-04-11 1179577/week @ 2025-04-18

5,053,700 downloads per month
Used in 4,596 crates (231 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
~31K SLoC