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

#17 in Command-line interface

Download history 495672/week @ 2024-01-13 519965/week @ 2024-01-20 510964/week @ 2024-01-27 511454/week @ 2024-02-03 508004/week @ 2024-02-10 528552/week @ 2024-02-17 594274/week @ 2024-02-24 572742/week @ 2024-03-02 573688/week @ 2024-03-09 562432/week @ 2024-03-16 537965/week @ 2024-03-23 576645/week @ 2024-03-30 553588/week @ 2024-04-06 567088/week @ 2024-04-13 601719/week @ 2024-04-20 479492/week @ 2024-04-27

2,300,473 downloads per month
Used in 3,221 crates (173 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–7MB
~40K SLoC