sgr-const 0.1.0

A convenience macro to generate string sequences for colored and stylized terminal output.
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 20.93 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 506.88 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • LunarLambda

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.