upload to git
This commit is contained in:
34
color.lua
Normal file
34
color.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
function Enum(tbl)
|
||||
for i = 1, #tbl do
|
||||
local v = tbl[i]
|
||||
tbl[v] = i
|
||||
end
|
||||
return tbl
|
||||
end
|
||||
|
||||
COLOR = Enum {
|
||||
"Black",
|
||||
"Red",
|
||||
"Green",
|
||||
"Yellow",
|
||||
"Blue",
|
||||
"Purple",
|
||||
"Cyan",
|
||||
"LightGray",
|
||||
"Gray",
|
||||
"HighRed",
|
||||
"HighGreen",
|
||||
"HighYellow",
|
||||
"HighBlue",
|
||||
"HighPurple",
|
||||
"HighCyan",
|
||||
"White"
|
||||
}
|
||||
|
||||
function colorText(Color, Text)
|
||||
return "\027[38;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
||||
end
|
||||
|
||||
function colorTextBackground(Color, Text)
|
||||
return "\027[48;5;"..tostring(Color-1).."m"..Text.."\027[0;m"
|
||||
end
|
||||
Reference in New Issue
Block a user