a better coloring crate
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | src/lib.rs | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -2,3 +2,10 @@ Small terminal coloring library, using proc macros. See [lib.rs](https://docs.rs/comat) for more information. + +## Usage + +```rust +use comat::cprintln; +cprintln!("{red}C{yellow}O{green}L{blue}O{magenta}R{reset}!"); +``` @@ -23,11 +23,11 @@ //! ``` //! vs //! ``` -//! print!("\x1b[0;34;31mred\x1b[0m."); +//! print!("\x1b[0;34;31m{thing}\x1b[0m."); //! ``` //! vs //! ```ignore -//! print!("{}.", "red".red()); +//! print!("{}.", thing.red()); //! ``` //! - intuitive: you dont have to //! ```ignore |