Renamed ansicolors to avoid namespace collision.
This commit is contained in:
parent
e9cb758efd
commit
88077bcac3
37
consolecolors.lua
Normal file
37
consolecolors.lua
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
local colors = {
|
||||||
|
-- attributes
|
||||||
|
reset = 0,
|
||||||
|
clear = 0,
|
||||||
|
bright = 1,
|
||||||
|
dim = 2,
|
||||||
|
underscore = 4,
|
||||||
|
blink = 5,
|
||||||
|
reverse = 7,
|
||||||
|
hidden = 8,
|
||||||
|
|
||||||
|
-- foreground
|
||||||
|
black = 30,
|
||||||
|
red = 31,
|
||||||
|
green = 32,
|
||||||
|
yellow = 33,
|
||||||
|
blue = 34,
|
||||||
|
magenta = 35,
|
||||||
|
cyan = 36,
|
||||||
|
white = 37,
|
||||||
|
|
||||||
|
-- background
|
||||||
|
onblack = 40,
|
||||||
|
onred = 41,
|
||||||
|
ongreen = 42,
|
||||||
|
onyellow = 43,
|
||||||
|
onblue = 44,
|
||||||
|
onmagenta = 45,
|
||||||
|
oncyan = 46,
|
||||||
|
onwhite = 47,
|
||||||
|
}
|
||||||
|
|
||||||
|
local _M = {}
|
||||||
|
for c, v in pairs(colors) do
|
||||||
|
_M[c] = string.char(27)..("[%dm"):format(v)
|
||||||
|
end
|
||||||
|
return _M
|
Loading…
Reference in New Issue
Block a user