2️⃣ HBHChalk
Purpose: Terminal string styling (colors, backgrounds, styles, RGB/Hex).
Features:
| Method / Property | Description |
|---|---|
red, green, blue… |
Standard ANSI colors |
brightRed, brightGreen… |
Bright text colors |
bgRed, bgGreen… |
Background colors |
hex(colorHex) |
24-bit color by hex (text) |
bgHex(colorHex) |
24-bit color by hex (background) |
rgb(r,g,b) |
Text color using RGB |
bgRgb(r,g,b) |
Background RGB color |
color256(code) |
256-color text |
bgColor256(code) |
256-color background |
bold, italic, underline, dim, inverse, strikethrough |
Text styles |
error(str) |
Shortcut: red.bold(str) |
strip(str) |
Removes all ANSI codes |
preview(str) |
Prints styled string to console |
Usage Example:
1HBHChalk.red.bold("Error!");2HBHChalk.hex("#ff8800")("Warning");3HBHChalk.bgRgb(0,128,255)("Hello Background");4HBHChalk.strip("\x1b[31mRed\x1b[0m");5// → "Red"