Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 12-May-2024 | - | 286 | 182 | ||
COPYING | D | 12-May-2024 | 126 | 4 | 2 | |
Cargo.toml | D | 12-May-2024 | 611 | 23 | 19 | |
LICENSE-MIT | D | 12-May-2024 | 1.1 KiB | 22 | 17 | |
README.md | D | 12-May-2024 | 1.4 KiB | 55 | 38 | |
UNLICENSE | D | 12-May-2024 | 1.2 KiB | 25 | 20 |
README.md
1## **This crate has reached its end-of-life and is now deprecated.** 2 3This crate was rolled into the 4[`winapi-util`](https://crates.io/crates/winapi-util) 5crate since `wincolor` is quite small and didn't otherwise have a good reason 6for living life as a distinct crate. 7 8The 9[`console`](https://docs.rs/winapi-util/0.1.*/x86_64-pc-windows-msvc/winapi_util/console/index.html) 10module of `winapi-util` is a drop-in replacement for `wincolor`. 11 12wincolor 13======== 14A simple Windows specific API for controlling text color in a Windows console. 15The purpose of this crate is to expose the full inflexibility of the Windows 16console without any platform independent abstraction. 17 18[![](https://img.shields.io/crates/v/wincolor.svg)](https://crates.io/crates/wincolor) 19 20Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). 21 22### Documentation 23 24[https://docs.rs/wincolor](https://docs.rs/wincolor) 25 26### Usage 27 28Add this to your `Cargo.toml`: 29 30```toml 31[dependencies] 32wincolor = "0.1" 33``` 34 35and this to your crate root: 36 37```rust 38extern crate wincolor; 39``` 40 41### Example 42 43This is a simple example that shows how to write text with a foreground color 44of cyan and the intense attribute set: 45 46```rust 47use wincolor::{Console, Color, Intense}; 48 49let mut con = Console::stdout().unwrap(); 50con.fg(Intense::Yes, Color::Cyan).unwrap(); 51println!("This text will be intense cyan."); 52con.reset().unwrap(); 53println!("This text will be normal."); 54``` 55