| Crates.io | inkline |
| lib.rs | inkline |
| version | 1.0.0-p2 |
| created_at | 2025-04-15 11:11:08.430862+00 |
| updated_at | 2025-04-15 11:13:07.82744+00 |
| description | Display colorized ascii art to the terminal |
| homepage | |
| repository | https://gitlab.com/celestifyx/inkline |
| max_upload_size | |
| id | 1634295 |
| size | 37,469 |
Display colorized ascii art to the terminal
To use this crate, add it as a dependency in your Cargo.toml:
[dependencies]
inkline = "1.0.0"
tintify = "1.0.0"
use tintify::DynColors;
use tintify::AnsiColors;
fn main() -> () {
const ASCII: &str = r#"
{2} .:--::////::--.`
{1} `/yNMMNho{2}////////////:.
{1} `+NMMMMMMMMmy{2}/////////////:`
{0} `-:::{1}ohNMMMMMMMNy{2}/////////////:`
{0} .::::::::{1}odMMMMMMMNy{2}/////////////-
{0} -:::::::::::{1}/hMMMMMMMmo{2}////////////-
{0} .::::::::::::::{1}oMMMMMMMMh{2}////////////-
{0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////`
{0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////-
{0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////:
{0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////:
{0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////-
{0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////`
{0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////-
{0} -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//-
{0} .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}-
{1} `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh.
{1} -yMMMo{0}::::::::::::::::{1}/MMMy-
{1} `/s{0}::::::::::::::::::{1}o/`
{0} ``.---::::---..`
"#;
let colors: Vec<DynColors> = vec![
DynColors::Ansi(AnsiColors::BrightCyan),
DynColors::Ansi(AnsiColors::BrightBlue),
DynColors::Ansi(AnsiColors::BrightMagenta)
];
let art: AsciiArt = AsciiArt::new(ASCII, colors.as_slice(), true);
for line in art {
println!("{}", line);
}
}
