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 cshout(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
| Function | Description |
|---|---|
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 |