def self.xterm_colors
@xterm_colors ||= [].tap do |out|
out << [0x00, 0x00, 0x00]
out << [0xcd, 0x00, 0x00]
out << [0x00, 0xcd, 0x00]
out << [0xcd, 0xcd, 0x00]
out << [0x00, 0x00, 0xee]
out << [0xcd, 0x00, 0xcd]
out << [0x00, 0xcd, 0xcd]
out << [0xe5, 0xe5, 0xe5]
out << [0x7f, 0x7f, 0x7f]
out << [0xff, 0x00, 0x00]
out << [0x00, 0xff, 0x00]
out << [0xff, 0xff, 0x00]
out << [0x5c, 0x5c, 0xff]
out << [0xff, 0x00, 0xff]
out << [0x00, 0xff, 0xff]
out << [0xff, 0xff, 0xff]
valuerange = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff]
217.times do |i|
r = valuerange[(i / 36) % 6]
g = valuerange[(i / 6) % 6]
b = valuerange[i % 6]
out << [r, g, b]
end
1.upto 22 do |i|
v = 8 + i * 10
out << [v, v, v]
end
end
end