console.color read/write property
The console.color property sets or gets the current console text color. The color is represented by a string Possible values are :
- "black"
- "blue"
- "green"
- "cyan"
- "red"
- "purple"
- "yellow"
- "white"
- "gray"
- "lightblue"
- "lightgreen"
- "lightcyan"
- "lightred"
- "lightpurple"
- "lightyellow"
- "brightwhite"
Example
local console = require "console"
-- writes in white (default text color)
console.writeln(console.color)
-- writes in red
console.color = "red"
console.writeln(console.color)
-- writes in white (back to the default text color)
console.color = "white"
console.writeln(console.color)