Luart
Comprehensive Windows framework to develop in Lua
modules > console > color

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 :

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)