Module: Vic::XtermColor

Defined in:
lib/vic/xterm_color.rb

Constant Summary collapse

SYSTEM =
[[0x00, 0x00, 0x00], [0x80, 0x00, 0x00], [0x00, 0x80, 0x00],
[0x80, 0x80, 0x00], [0x00, 0x00, 0x80], [0x80, 0x00, 0x80],
[0x00, 0x80, 0x80], [0xc0, 0xc0, 0xc0], [0x80, 0x80, 0x80],
[0xff, 0x00, 0x00], [0x00, 0xff, 0x00], [0xff, 0xff, 0x00],
[0x00, 0x00, 0xff], [0xff, 0x00, 0xff], [0x00, 0xff, 0xff],
[0xff, 0xff, 0xff]]
RGB =
[0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff].repeated_permutation(3).to_a
GREYSCALE =
(0x08..0xee).step(0x0a).map { |v| [v] * 3 }

Class Method Summary collapse

Class Method Details

.tableObject



14
15
16
# File 'lib/vic/xterm_color.rb', line 14

def self.table
  SYSTEM + RGB + GREYSCALE
end