Crates.io | wincolor |
lib.rs | wincolor |
version | 1.0.3 |
source | src |
created_at | 2016-11-20 20:44:40.055503 |
updated_at | 2020-01-11 15:07:48.314839 |
description | DEPRECATED. Use winapi-util instead. |
homepage | https://github.com/BurntSushi/termcolor/tree/master/wincolor |
repository | https://github.com/BurntSushi/termcolor/tree/master/wincolor |
max_upload_size | |
id | 7316 |
size | 13,660 |
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
.
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.
Add this to your Cargo.toml
:
[dependencies]
wincolor = "0.1"
and this to your crate root:
extern crate wincolor;
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.");