Thank you Neil.
It works for me on Windows with the foreground color setting (default and bold). But all colors have this ugly background color. I have not found a way to change this.
Here my test script and result:
fg = {
red='\27[31m',
redbold='\27[31;1m',
green='\27[32m',
greenbold='\27[32;1m',
yellow='\27[33m',
yellowbold='\27[33;1m',
blue='\27[34m',
bluebold='\27[34;1m',
pink='\27[35m',
pinkbold='\27[35;1m',
cyan='\27[36m',
cyanbold='\27[36;1m',
white='\27[37m',
whitebold='\27[37;1m',
def='\27[0m'}
print(fg.red..'List '..fg.cyan..'of '..fg.bluebold..'colors'..fg.pinkbold..'!\n'..fg.def)
for color, seq in pairs (fg) do
if tostring(color) ~= 'def' then print(seq..tostring(color)..fg.def) end
end