Modules@robinpath/color
@robinpath/color
0.1.0PublicTerminal ANSI color utilities: red, green, blue, bold, underline, RGB, and more.
@robinpath/color
Terminal ANSI color utilities: red, green, blue, bold, underline, RGB, and more.
Why use this module?
Use the color module to integrate utility capabilities into your RobinPath scripts.
Installation
npm install @robinpath/color
Quick Start
No credentials needed — start using it right away:
set $msg as color.green "success"
print $msg
Available Functions
| Function | Description |
|---|---|
color.red | Wrap text in red |
color.green | Wrap text in green |
color.blue | Wrap text in blue |
color.yellow | Wrap text in yellow |
color.cyan | Wrap text in cyan |
color.magenta | Wrap text in magenta |
color.white | Wrap text in white |
color.gray | Wrap text in gray |
color.bold | Wrap text in bold |
color.dim | Wrap text in dim |
color.italic | Wrap text in italic |
color.underline | Wrap text with underline |
color.strikethrough | Wrap text with strikethrough |
color.bgRed | Wrap text with red background |
color.bgGreen | Wrap text with green background |
color.bgBlue | Wrap text with blue background |
color.strip | Strip all ANSI escape codes from text |
color.rgb | Wrap text with custom RGB foreground color |
Examples
Wrap text in green foreground color.
set $msg as color.green "success"
print $msg
Wrap text in blue foreground color.
set $msg as color.blue "info"
print $msg
Wrap text in yellow foreground color.
set $msg as color.yellow "warning"
print $msg
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/color";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
set $msg as color.green "success"
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/log— Structured logging that can use color for formatted output@robinpath/string— String manipulation utilities for text processing@robinpath/debug— Debug output utilities complemented by color formatting@robinpath/template— Template rendering that can include colored placeholders
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/color Version0.1.0
LicenseMIT
Unpacked Size4.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

