Crates.io | rainbow-text |
lib.rs | rainbow-text |
version | 0.1.5 |
source | src |
created_at | 2020-11-15 10:58:20.016446 |
updated_at | 2020-11-17 10:10:08.07314 |
description | Write text in rainbow colors |
homepage | |
repository | https://github.com/rishit-khandelwal/rainbow |
max_upload_size | |
id | 312544 |
size | 5,249 |
A crate for writing text in rainbow colors.
use rainbow_text::Rainbow;
fn main() -> std::io::Result<()>
{
let rain = Rainbow::default();
rain.write("Hello, World")?;
Ok(())
}
use rainbow_text::Rainbow;
fn main() -> std::io::Result<()>
{
let rain = Rainbow::default();
rain.write_bg("Hello, World")?;
Ok(())
}
use rainbow_text::{ Rainbow, Color };
fn main() -> std::io::Result<()>
{
let rain = Rainbow::custom(
vec![
Color::Rgb(255,0,0),
Color::Rgb(0,255,0),
Color::Rgb(0,0,255),
]
);
rain.write("Hello, World")?;
Ok(())
}