sgr-const 0.1.0

A convenience macro to generate string sequences for colored and stylized terminal output.
Documentation

sgr_const!

Documentation

A macro to generate SGR control sequences for colored output in terminal applications.

[dependencies]
sgr-const = "0.1"

Example

sgr_const::sgr_const! {
    STYLE_CYAN = Bold | CyanFg;
    STYLE_NONE = Reset;
}

println!("{}{}{}", STYLE_CYAN, "This text will be cyan if your terminal supports it!", STYLE_NONE);

License

This project is licensed under the Mozilla Public License, Version 2.0. See LICENSE for more information.