Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
src/ | H | 03-May-2022 | - | 298 | 194 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
COPYING | H A D | 17-Jul-2018 | 126 | 4 | 2 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.1 KiB | 34 | 30 | |
Cargo.toml.orig-cargo | H A D | 16-Aug-2019 | 659 | 25 | 21 | |
LICENSE-MIT | H A D | 17-Jul-2018 | 1.1 KiB | 22 | 17 | |
README.md | H A D | 17-Jul-2018 | 1.1 KiB | 45 | 31 | |
UNLICENSE | H A D | 17-Jul-2018 | 1.2 KiB | 25 | 20 |
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