def self.color_name(*colors)
colors = colors.flatten.compact
if colors.first == :highline
colors[1..-1]
else
translated_colors = colors.map do |color|
color = color.to_s
case color
when "nothing"
color = "clear"
when /light_gray/
color = color.sub("light_gray", "white")
when /dark_gray/
color = color.sub("dark_gray", "light_black")
when /yellow/
color = color.sub("yellow", "light_yellow")
when /white/
color = color.sub("white", "light_white")
when /brown/
color = color.sub("brown", "yellow")
when /purple/
color = color.sub("purple", "magenta")
end
color_set = [color.to_sym]
if color_set.first.to_s =~ /^light_(.*)/
color_set[0] = $1.to_sym
color_set << :bold
end
case color_set.first.to_s
when /(.*)_underline$/
color_set[0] = [$1.to_sym]
color_set << :underline
when /(.*)_background$/
color_set[0] = [('on_'+$1).to_sym]
end
color_set
end
translated_colors.flatten
end
end