colorify

Crates.iocolorify
lib.rscolorify
version0.2.3
sourcesrc
created_at2016-03-09 06:19:23.699265
updated_at2018-05-25 22:42:07.318733
descriptionConvenience macros for printing to the terminal in color on non-Windows platforms.
homepagehttps://github.com/cogciprocate/colorify
repositoryhttps://github.com/cogciprocate/colorify
max_upload_size
id4410
size12,905
Nick Sanders (c0gent)

documentation

http://doc.cogciprocate.com/colorify/colorify/index.html

README

colorify!

Documentation

Handy macros for printing to the terminal in color.

Usage

Add the following to your Cargo.toml:

[dependencies]
colorify = "0.2"

Example

#[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();
}

Retired

This library is unlikely to be updated with new features or changes.

Recommended alternatives:

Commit count: 13

cargo fmt