ColorPrint

#import Builtin:ColorPrint;

A builtin module for printing colored text to the terminal using ANSI escape codes

Functions


colorPrint(string, color)

colorPrint:: (s : string, col : string) 

Prints a string to the terminal with the specified color, then resets color formatting

Arguments

s
string
The string to print
col
string
The color code to use, see Fore and Back

colorPrint(string, fg color, bg color)

colorPrint:: (s : string, fg : string, bg : string) 

Prints a string to the terminal with the specified foreground and background colors, then resets color formatting

Arguments

s
string
The string to print
fg
string
The color code to use for the foreground see Fore
bg
string
The color code to use for the background see Back

Constants


resetColor
string
ANSI escape code to reset all color formatting back to terminal defaults