Comparison

util/termcolours.lua @ 7206:1c005878db55

util.termcolours: Rename loop variable [luacheck]
author Kim Alvefur <zash@zash.se>
date Sun, 28 Feb 2016 15:03:16 +0100
parent 7205:a6c4530c1bc0
child 8368:3629639d5fa9
comparison
equal deleted inserted replaced
7205:a6c4530c1bc0 7206:1c005878db55
89 red = "ff0000"; fuchsia = "ff00ff"; green = "008000"; white = "ffffff"; 89 red = "ff0000"; fuchsia = "ff00ff"; green = "008000"; white = "ffffff";
90 lime = "00ff00"; yellow = "ffff00"; purple = "800080"; blue = "0000ff"; 90 lime = "00ff00"; yellow = "ffff00"; purple = "800080"; blue = "0000ff";
91 aqua = "00ffff"; olive = "808000"; black = "000000"; navy = "000080"; 91 aqua = "00ffff"; olive = "808000"; black = "000000"; navy = "000080";
92 teal = "008080"; silver = "c0c0c0"; maroon = "800000"; gray = "808080"; 92 teal = "008080"; silver = "c0c0c0"; maroon = "800000"; gray = "808080";
93 } 93 }
94 for color, rgb in pairs(csscolors) do 94 for colorname, rgb in pairs(csscolors) do
95 stylemap[color] = stylemap[color] or stylemap[rgb]; 95 stylemap[colorname] = stylemap[colorname] or stylemap[rgb];
96 color, rgb = color .. " background", rgb .. " background" 96 colorname, rgb = colorname .. " background", rgb .. " background"
97 stylemap[color] = stylemap[color] or stylemap[rgb]; 97 stylemap[colorname] = stylemap[colorname] or stylemap[rgb];
98 end 98 end
99 99
100 local function getstyle(...) 100 local function getstyle(...)
101 local styles, result = { ... }, {}; 101 local styles, result = { ... }, {};
102 for i, style in ipairs(styles) do 102 for i, style in ipairs(styles) do