aboutsummaryrefslogtreecommitdiffstats
path: root/cli/colortest.lua
blob: 8f8c95fc96b3923566e55e6aa348259e619be64b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env lua

function cl(e)
    return string.format('\27[%sm', e)
end

function print_fg(bg, pre)
    for fg = 30,37 do
        fg = pre..fg
        io.write(cl(bg), cl(fg), string.format(' %6s ', fg), cl(0))
    end
end

for bg = 40,47 do
    io.write(cl(0), ' ', bg, ' ')
    print_fg(bg, ' ')
    io.write('\n    ')
    print_fg(bg, '1;')
    io.write('\n\n')
end

-- Andres P