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

#13 in Command-line interface

Download history 501668/week @ 2024-01-26 509954/week @ 2024-02-02 508884/week @ 2024-02-09 514867/week @ 2024-02-16 604338/week @ 2024-02-23 567869/week @ 2024-03-01 576568/week @ 2024-03-08 562225/week @ 2024-03-15 558138/week @ 2024-03-22 550717/week @ 2024-03-29 558603/week @ 2024-04-05 567418/week @ 2024-04-12 593014/week @ 2024-04-19 579046/week @ 2024-04-26 587936/week @ 2024-05-03 479637/week @ 2024-05-10

2,342,114 downloads per month
Used in 3,243 crates (175 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–7.5MB
~41K SLoC