#escaping #ansi #console #printing #colorful #simplifies #paint

terminal-paint

library that simplifies printing colorful text to your console

1 stable release

1.0.0 Dec 28, 2022
0.1.0 Dec 28, 2022

#1089 in Command-line interface

MIT license

6KB

terminal-paint

rust library that simplifies printing colorful text to the console with ANSI escape. It is based on ANSI Escape Code. Should work on Linux, macOS and Windows (from Windows 10 1511+)

Example

use terminal_paint as tp;

let my_str: String = tp::paint("hello world!", tp::YELLOW);
let my_str2: String = tp::paint("world hello", tp::ON_RED);
println!("{}, {}", my_str, my_str2);

// this will call println! and change the color of your text
tp::color_println("this is blue text", tp::BLUE);

License

This crate is distributed under the MIT license. https://opensource.org/licenses/MIT


lib.rs:

Terminal paint

terminal-paint is a library that simplifies printing colorful text to your console. It is based on ANSI Escape Code. Should work on Linux, macOS and Windows (from Windows 10 1511+)

No runtime deps