legion-colors

Terminal color and style library. ANSI escape codes, 256-color support, hex colors, gradients, and spinners.

v1.1.0 MIT @legionhjyu Updated NaNy ago
Install
legion pkg install legion-colors

legion-colors

Terminal colors and styling for legionhjyu CLI programs.

Install

legion pkg install legion-colors

Usage

summon "legion-colors" release c

shout(c.red("error") + ": file not found") shout(c.bold(c.green("success"))) shout(c.rgb(255, 128, 0, "custom orange")) shout(c.gradient("Legion", ["#7C3AED", "#60A5FA"]))

API

FunctionDescription
c.red(text)Red text
c.green(text)Green text
c.blue(text)Blue text
c.yellow(text)Yellow text
c.magenta(text)Magenta text
c.cyan(text)Cyan text
c.bold(text)Bold text
c.italic(text)Italic text
c.underline(text)Underlined text
c.rgb(r, g, b, text)24-bit color
c.bg(color, text)Background color
c.gradient(text, colors)Gradient text
c.strip(text)Remove all escape codes