console.writecolor(color, [...])function
Writes colored output to the console using console.stdout. The function change the color of the text (not its background). Then the function set back the text color to the previous one. Console.write() can write more than one string, each string is separated with a space character.
Parameters
color
A string that represents the color of the printed text. See console.color for possible values.
[...]
Optional strings to write to the console, separated by commas. If the argument is not a string, the function converts it internally using the tostring function.
Return value
The function returns no value.Example
--! luart-extensions
import console
-- writes in gray
console.writeln("gray", "I'm in gray")
-- writes in red
console.writecolor("red", "Now I'm red !\n")
-- writes in white (back to the default text color)
console.writeln("white", "back to the (boring) white")