• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H03-May-2022-298194

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

COPYINGH A D17-Jul-2018126 42

Cargo.tomlH A D01-Jan-19701.1 KiB3430

Cargo.toml.orig-cargoH A D16-Aug-2019659 2521

LICENSE-MITH A D17-Jul-20181.1 KiB2217

README.mdH A D17-Jul-20181.1 KiB4531

UNLICENSEH A D17-Jul-20181.2 KiB2520

README.md

1wincolor
2========
3A simple Windows specific API for controlling text color in a Windows console.
4The purpose of this crate is to expose the full inflexibility of the Windows
5console without any platform independent abstraction.
6
7[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/ripgrep?svg=true)](https://ci.appveyor.com/project/BurntSushi/ripgrep)
8[![](https://img.shields.io/crates/v/wincolor.svg)](https://crates.io/crates/wincolor)
9
10Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
11
12### Documentation
13
14[https://docs.rs/wincolor](https://docs.rs/wincolor)
15
16### Usage
17
18Add this to your `Cargo.toml`:
19
20```toml
21[dependencies]
22wincolor = "0.1"
23```
24
25and this to your crate root:
26
27```rust
28extern crate wincolor;
29```
30
31### Example
32
33This is a simple example that shows how to write text with a foreground color
34of cyan and the intense attribute set:
35
36```rust
37use wincolor::{Console, Color, Intense};
38
39let mut con = Console::stdout().unwrap();
40con.fg(Intense::Yes, Color::Cyan).unwrap();
41println!("This text will be intense cyan.");
42con.reset().unwrap();
43println!("This text will be normal.");
44```
45