Global

Color( r number, g number, b number ) color

Compose and returns a RGB Color object. Values for the 3 channels are always expressed in the range 0-255.

ColorRGBA( r number, g number, b number, a number ) color

Compose and returns a RGB Color object, with Alpha. Values for the 4 channels are always expressed in the range 0-255. Alpha 0 is transparent

ColorHSV( h number, s number, v number ) color

Compose and returns a RGB Color Object, expressing it in HSV values.
Hue [0-360]
Saturation [0-100]
Value [0-100]

log( message string )

logWarning( message string )

logError( message string )

write( text string )

writeln( text string )

setFgColor( colorId number )

Use ANSI colors:
Black 30
Dark red 31
Dark green 32
Dark yellow 33
Dark blue 34
Dark magenta 35
Dark cyan 36
Light gray 37
Dark gray 90
Red 91
Green 92
Orange 93
Blue 94
Magenta 95
Cyan 96
White 97

setBgColor( colorId number )

Use ANSI colors:
Black 40
Dark red 41
Dark green 42
Dark yellow 43
Dark blue 44
Dark magenta 45
Dark cyan 46
Light gray 47
Dark gray 100
Red 101
Green 102
Orange 103
Blue 104
Magenta 105
Cyan 106
White 107

resetFgColor( )

resetBgColor( )

resetColors( )

setCursorPos( column number, line number )

setCursorX( column number )

setCursorY( line number )

moveCursorX( deltaColumn number )

moveCursorY( deltaLine number )

saveCursorPos( )

restoreCursorPos( )

clear( )

clearToEndLine( )