const_colors 0.1.0

For when all you need, are colors in your terminal
Documentation
  • Coverage
  • 0%
    0 out of 27 items documented0 out of 0 items with examples
  • Size
  • Source code size: 3.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.51 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • StratusFearMe21/const_colors
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • StratusFearMe21

For when you just need colors

const_colors is a set of macros that allow you to have colors in your Linux terminal without the need to allocate anything to do so.

How to use

To use, simply use the concat! macro in your strings like so

concat!(red!(), "I'm red, make sure to end me", end!(), green!(), "Now I'm green", end!(), bold!(), blue!(), "Now I am bold blue", end!());

To use colors with non-constant values, simply use the format! macro in tandom with the concat! macro like so

format!(concat!("Server initialization ", bold!(), "{}", end!()));
println!(concat!("This also works with ", bold!(), "{}", end!(), "formatted data"));