Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ferhatgec/colodot
Colo[dot]rs, Powerful Rust implementation of Colorized library.
https://github.com/ferhatgec/colodot
ansi color colorized fegeya rs rust rust-lang rust-library term terminal
Last synced: about 2 months ago
JSON representation
Colo[dot]rs, Powerful Rust implementation of Colorized library.
- Host: GitHub
- URL: https://github.com/ferhatgec/colodot
- Owner: ferhatgec
- License: mit
- Created: 2021-03-26T22:32:47.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-02T07:38:09.000Z (almost 4 years ago)
- Last Synced: 2024-10-31T11:52:18.725Z (2 months ago)
- Topics: ansi, color, colorized, fegeya, rs, rust, rust-lang, rust-library, term, terminal
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Colo[dot]rs
Easy-to-use, powerful Rust implementation of Colorized library.```rust
colodot!(DotTypes::Bold, DotColors::Red, "Hello, red!\n", true);
colodot!(DotTypes::Light,DotColors::Green, "Hello, green!\n", true);
colodot!(DotTypes::Blink,DotColors::Blue, "Hello, blue!\n", true);red() ; println!("{}", "Hello, red!" );
green(); println!("{}", "Hello, green!");
blue() ; println!("{}", "Hello, blue!" );colodot! (colodot::dot::DotTrueColor{r: 255, g: 255, b: 255}, "Hello, world!\n");
colodottc!(colodot::dot::DotTrueColor{r: 12 , g: 50, b: 40 }, "Hello, world!" );colodot! (from_hex(0xffffff), "Hello, world!\n");
colodottc!(colodot::dot::DotTrueColor{r: 200, g: 100, b: 12 }, "Hello, world!", true);
true_color (1 , 1 , 1 , &["Hello", " , ", "world", "!"]);
bg_true_color(230, 15, 60, &["Hello", " , ", "world", "!"]);basic_true_color (colodot::dot::DotTrueColor{r: 5 , g: 5 , b: 5 }, "Hello, world!");
basic_bg_true_color(colodot::dot::DotTrueColor{r: 235, g: 20, b: 65}, "Hello, world!");
```### How to use?
Add this code-block to your ``Cargo.toml`````toml
[dependencies]
colodot = "0.1.5"
```and *Do not forget* to add this to your ``main.rs`` or ``lib.rs``
```rust
#[macro_use]
extern crate colodot;use colodot::dot::*;
fn main() {
colodot!(colodot::dot::DotTrueColor{r: 255, g: 255, b: 255}, "Huhuuu ^-^!\n");
}
```### TODO:
* Formatter support.
* PowerShell support. (Windows)
* More tests.### Colo[dot]rs licensed under the terms of MIT License.