Crates.io | colorify |
lib.rs | colorify |
version | 0.2.3 |
source | src |
created_at | 2016-03-09 06:19:23.699265 |
updated_at | 2018-05-25 22:42:07.318733 |
description | Convenience macros for printing to the terminal in color on non-Windows platforms. |
homepage | https://github.com/cogciprocate/colorify |
repository | https://github.com/cogciprocate/colorify |
max_upload_size | |
id | 4410 |
size | 12,905 |
Handy macros for printing to the terminal in color.
Add the following to your Cargo.toml
:
[dependencies]
colorify = "0.2"
#[macro_use] extern crate colorify;
use std::io::{self, Write};
fn main() {
// List colors:
printc!(help);
// Use one of three ways:
printc!(yellow: "Number of banana peels on head: {}", 7);
printlnc!(red: "Number of zombies killed: {}", 50);
writeln!(io::stdout(), colorify!(orange: "Number of baggies filled \
while walking dogs: {}"), 2).unwrap();
}
This library is unlikely to be updated with new features or changes.
Recommended alternatives: