utilprint 0.1.3

A utility crate for easily using colors or unicode in your terminal printing
Documentation

UtilPrint

Crates.io Documentation License

UtilPrint is a minimalist Rust crate designed to simplify the process of adding color and Unicode characters, such as emojis, to your terminal output.

It provides a fast and easy-to-use interface for enhancing your console applications with visually appealing elements. This is how it looks in a few different terminals. The aesthetics will depend on your terminal settings and support.

Features

  • Easy to Use: UtilPrint offers a straightforward API that makes it simple to integrate color and Unicode characters into your terminal output.
  • Minimalistic: The crate is designed to be lightweight and unobtrusive, focusing on providing essential functionality without unnecessary complexity.
  • Fast: UtilPrint is optimized for performance, ensuring that adding color and emojis to your terminal output doesn't slow down your application.
  • Unicode Support: Easily incorporate Unicode characters, including emojis, into your terminal output to create more engaging and expressive console applications.

Installation

Add utilprint to your Cargo.toml:

[dependencies]
utilprint = "0.1.3"

Usage Here's a quick example of how to use UtilPrint to add color and an emoji to your terminal output:

use utilprint::utilprint;

fn main() {
    utilprint("@x226He@x190ll@x155o @x119W@x120or@x084l@x085d, @x050t@x051his @x045is@x075 U@x069t@x105il@x099P@x135ri@x165nt@x201, let@x200's m@x205ake t@x204he@x210 w@x209or@x215ld co@x220lorf@x226ul!@w Here is a #2615, @ua Euro #20AC @Rs@ry@Rm@rb@Ro@rl@u, @Mand p@mu@Mr@mp@Ml@me @Mt@me@Mx@mt");
}

This will print Hello World, this is UtilPrint, let's make the world Colorful! In rainbow colors, and then it includes more text in different colors, and some unicode characters, like an emoji. Here is a ☕, a Euro € symbol, and purple text

Color Codes

UtilPrint uses simple color codes to specify colors:

@d: Black
@r: Red
@g: Green
@y: Yellow
@b: Blue
@m: Magenta
@c: Cyan
@w: White
@D: Gray (Bright Black)
@R: Bright Red
@G: Bright Green
@Y: Bright Yellow
@B: Bright Blue
@M: Bright Magenta
@C: Bright Cyan
@W: Bright White
@u: Reset color
For Xterm 256 colors, use @xNNN where NNN is the color number.

Unicode Characters
To add Unicode characters, use #NNNN where NNNN is the Unicode code. For example, #1F600 for a smiley face.

Contributing

Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest new features.

License

UtilPrint is licensed under the MIT License. Have fun using or modifying it! If you want to credit me, that would be great!