A macro to generate string sequences for colored terminal output.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luna Catkins 8d4d98d780
Cargo.toml: Added extra metadata for crates.io
1 month ago
src Initial Commit. 1 month ago
.gitignore Initial Commit. 1 month ago
Cargo.toml Cargo.toml: Added extra metadata for crates.io 1 month ago
LICENSE Initial Commit. 1 month ago
README.md Initial Commit. 1 month ago

README.md

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.