This crate has reached its end-of-life and is now deprecated.
This crate was rolled into the
winapi-util
crate since wincolor
is quite small and didn't otherwise have a good reason
for living life as a distinct crate.
The
console
module of winapi-util
is a drop-in replacement for wincolor
.
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.
Dual-licensed under MIT or the UNLICENSE.
Documentation
Usage
Add this to your Cargo.toml
:
[]
= "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 ;
let mut con = stdout.unwrap;
con.fg.unwrap;
println!;
con.reset.unwrap;
println!;