| Crates.io | inksac |
| lib.rs | inksac |
| version | 0.5.0 |
| created_at | 2023-05-31 04:12:08.839106+00 |
| updated_at | 2025-01-21 03:07:18.471785+00 |
| description | Just another color lib for terminal environment |
| homepage | |
| repository | https://github.com/SkuldNorniern/inksac-rs |
| max_upload_size | |
| id | 878517 |
| size | 92,009 |
Inksac is a Rust library that amplifies terminal outputs by offering a seamless integration with ANSI color support. It is designed to be uncomplicated, flexible, and delightful to use, adding a splash of color to your terminal applications.
ANSI Color Support Detection: Automatically detect terminal color support levels including True Color support.
Rich Text Styling:
Color Manipulation:
Flexible API:
Styleableuse inksac::{Color, Style, Styleable};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let style = Style::builder()
.foreground(Color::Green)
.bold()
.build();
println!("{}", "Hello, Colorful World!".style(style));
Ok(())
}
use inksac::{Color, Style, Styleable};
let error_style = Style::builder()
.foreground(Color::Red)
.bold()
.build();
println!("{}: {}", "ERROR".style(error_style), "Operation failed");
Add Inksac to your project:
cargo add inksac
Check out the examples directory for more detailed examples including:
Inksac automatically detects terminal capabilities and adjusts its output accordingly. The actual color representation may vary based on:
Happy Coding!