gecko-dev/third_party/rust/wincolor
Servo VCS Sync fcc0405926 No bug - Revendor rust dependencies
--HG--
rename : third_party/rust/env_logger/src/regex.rs => third_party/rust/env_logger-0.4.3/src/regex.rs
rename : third_party/rust/env_logger/src/string.rs => third_party/rust/env_logger-0.4.3/src/string.rs
2018-03-28 20:23:10 +00:00
..
src No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
.cargo-checksum.json No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
COPYING No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
Cargo.toml No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
LICENSE-MIT No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
README.md No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00
UNLICENSE No bug - Revendor rust dependencies 2018-03-28 20:23:10 +00:00

README.md

wincolor

A simple Windows specific API for controlling text color in a Windows console. The purpose of this crate is to expose the full inflexibility of the Windows console without any platform independent abstraction.

Windows build status

Dual-licensed under MIT or the UNLICENSE.

Documentation

https://docs.rs/wincolor

Usage

Add this to your Cargo.toml:

[dependencies]
wincolor = "0.1"

and this to your crate root:

extern crate wincolor;

Example

This is a simple example that shows how to write text with a foreground color of cyan and the intense attribute set:

use wincolor::{Console, Color, Intense};

let mut con = Console::stdout().unwrap();
con.fg(Intense::Yes, Color::Cyan).unwrap();
println!("This text will be intense cyan.");
con.reset().unwrap();
println!("This text will be normal.");