#windows #win #color #ansi #console

wincolor

A simple Windows specific API for controlling text color in a Windows console.

8 releases (1 stable)

1.0.0 Jul 17, 2018
0.1.6 Feb 11, 2018
0.1.4 Jun 19, 2017
0.1.3 Mar 13, 2017
0.1.0 Nov 20, 2016

#2 in Command-line interface

Download history 9075/week @ 2018-05-06 12619/week @ 2018-05-13 12419/week @ 2018-05-20 11124/week @ 2018-05-27 11700/week @ 2018-06-03 12089/week @ 2018-06-10 10535/week @ 2018-06-17 11495/week @ 2018-06-24 13551/week @ 2018-07-01 11783/week @ 2018-07-08 12308/week @ 2018-07-15 14363/week @ 2018-07-22 11673/week @ 2018-07-29

51,115 downloads per month

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.");
Unlicense/MIT license

Dependencies

  • winapi 0.3+consoleapi+minwindef+processenv+winbase+wincon

Reverse deps