#ansi-term #terminal #color

tiny-ansi

TinyAnsi is a dead simple library that allows basic coloring of terminal characters

1 unstable release

0.1.0 Jul 25, 2022

#75 in #ansi-term

Download history 10/week @ 2024-02-19 25/week @ 2024-02-26 13/week @ 2024-03-04 10/week @ 2024-03-11 15/week @ 2024-03-18 18/week @ 2024-03-25

58 downloads per month
Used in 4 crates

MIT license

11KB
224 lines

TinyAnsi

About

TinyAnsi is a dead simple library that allows basic coloring of terminal characters.

There are many crates for the ansi terminal that have been created and abandoned, but none of them solve the following problem. If that is the case, I do not need complex functionality, so I built the library on a scale such that the code can be read at a glance. https://github.com/jam1garner/owo-colors/issues/45

How to use

# Cargo.toml

[dependencies]
tiny-ansi = "0.1.0"
use tiny_ansi::TinyAnsi;
println!("{}", "red".red());
println!(
    "{}",
    "bold italic red on green".bold().italic().red().on_green()
);

License

tiny-ansi is released under the MIT License


lib.rs:

TinyAnsi

TinyAnsi is a dead simple library that allows basic coloring of terminal characters.

Usage

use tiny_ansi::TinyAnsi;
println!("{}", "red".red());
println!(
    "{}",
    "bold italic red on green".bold().italic().red().on_green()
);

No runtime deps