Task

Display a word in various colours on the terminal.

The system palette, or colours such as Red, Green, Blue, Magenta, Cyan, and Yellow can be used.



Optionally demonstrate:

 How the system should determine if the terminal supports colour
 Setting of the background colour
 How to cause blinking or flashing (if supported by the terminal)


 
# Project : Terminal control/Coloured text
 
load "consolecolors.ring"
 
forecolors = [CC_FG_BLACK,CC_FG_RED,CC_FG_GREEN,CC_FG_YELLOW,
                   CC_FG_BLUE,CC_FG_MAGENTA,CC_FG_CYAN,CC_FG_GRAY,CC_BG_WHITE]
 
for n = 1 to len(forecolors)
     forecolor = forecolors[n] 
     cc_print(forecolor | CC_BG_WHITE, "Rosetta Code" + nl)
next
 