lcolorize Reference

Impressum / Imprint

Files

File Download Size Description
lcolorize.lua test.mk16.de/scriptFiles/lcolorize.lua 707 Bytes(KB) Lua script
lcolorize-1.0-1.rockspec test.mk16.de/scriptFiles/lcolorize-1.0-1.rockspec 547 Bytes(B) Lua Rock Specification
lcolorize-1.0-1.src.rock test.mk16.de/scriptFiles/lcolorize-1.0-1.src.rock 846 Bytes(B) Lua rock

Functions

Function Argument 1 Argument 2 Argument 3 Return Description
lcolorize.setcolor The IO stream to be colored. The font color The background color None Colors the text of an IO stream.
lcolorize.reset The IO stream at which the coloring is to be reset. None None None Resets the coloring.

Colors lcolorize.colors

Name Value Description
none 0 No color / Standard color
black 30 The color black
red 31 The colorred red
green 32 The color green
yellow 33 The color yellow
blue 34 The color blue
magenta 35 The color magenta
cyan 36 The color cyan
white 37 The color white

lcolorize colors text in an IO stream.
For example, the text on the console can be colored.
Note: This tool may not work under the Windows platform.

If you do not want to specify the background color or want to reset it, you can use lcolorize.colors.none.

lcolorize is available under the GNU GPL v3 for full details see here.

Example

lcolorize = require "lcolorize"
lcolorize.setcolor(io, lcolorize.colors.cyan, lcolorize.colors.blue)
print("test")
lcolorize.reset(io)

Output: [font color cyan][background color blue] test