| Crates.io | inkline |
| lib.rs | inkline |
| version | 1.0.6 |
| created_at | 2025-04-15 11:11:08.430862+00 |
| updated_at | 2026-01-03 13:45:40.916094+00 |
| description | Display colorized ascii art to the terminal |
| homepage | |
| repository | https://gitlab.com/inkline/inkline-rs |
| max_upload_size | |
| id | 1634295 |
| size | 86,985 |
Display colorized ASCII art and info directly in the terminal.
Add this crate as a dependency in your Cargo.toml:
[dependencies]
inkline = "1.0.4"
chromakitx = "1.0.2"
use inkline::{
AsciiArt,
InfoConfig,
InfoPosition
};
use chromakitx::{
AnsiColor,
AnyColor
};
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<AnyColor> = vec![
AnsiColor::BrightCyan.into(),
AnsiColor::BrightBlue.into(),
AnsiColor::BrightMagenta.into()
];
let info: InfoConfig = InfoConfig::new(vec![
"Hello World!".to_string(),
"This is Inkline.".to_string(),
"Made with ❤️ in Rust.".to_string(),
"Developer: CELESTIFYX Team".to_string()
]).with_position(InfoPosition::Right).with_margin(4);
let mut art: AsciiArt = AsciiArt::new(Some(ASCII.to_string()), Some(colors), true, Some(info));
println!("{}", (&mut art).render());
}
