Модуль:TypeToColor
Для документации этого модуля может быть создана страница Модуль:TypeToColor/doc
local p = {}
function p.convert( frame )
return p.convertImpl(frame.args[1])
end
function p.convertImpl(type)
local types = {
black = '000000', drink = '000000',
navy = '000080', sleep = '000080',
blue = '0000FF', city = '0000FF',
buy = '008080', teal = '008080',
magenta = '00FF00',
forestgreen = '228B22', listing = '228B22', other = '228B22',
royalblue = '4169E1', view = '4169E1',
see = '4682B4', steelblue = '4682B4',
orange = '66CDAA',
maroon = '800000', vicinity = '800000',
around = '800080', purple = '800080',
['do'] = '808080', gray = '808080', grey = '808080',
brown = 'A52A2A', go = 'A52A2A',
chocolate = 'D2691E', eat = 'D2691E',
red = 'DDA0DD',
silver = 'FF0000',
mediumaquamarine = 'FF00FF',
plum = 'FFA500',
gold = 'FFD700', lime = 'FFD700',
}
return types[type] or 'C0C0C0'
end
return p