Inksac
Inksac is a Rust library that enhances terminal outputs by providing easy to use ANSI color support. It's designed to be simple, flexible, and enjoyable to use, giving your terminal applications a colorful edge.
Features
-
Check ANSI Color Support: Inksac has a built-in function to check if the current terminal supports ANSI colors.
-
Customizable Styles: Create your own text styles with customizable foreground and background colors.
-
Colorful Text Output: Enhance your terminal applications with colorful text outputs using Inksac's
ColoredString. -
True Color Support: Inksac Supports True Color by RGB, HEX values.
-
Format Support: Inksac Support Bold, Dim, Italic, Underline - More options can be added in the future.
Usage
use check_color_available;
use *;
// Check if the terminal supports ANSI colors
match check_color_available
// Define your style
const TITLESTYLE: Style = Style;
// Create a colored string
let title_text: ColoredString = new;
// Output the colored string
println!;
Installation
Disclaimer
Please note that color support depends on the terminal's capabilities and might not work as expected on all platforms.
Happy Coding!