Class: Vedeu::Background

Inherits:
Translator show all
Defined in:
lib/vedeu/output/background.rb

Overview

The class represents one half (the other, can be found at Foreground) of a terminal colour escape sequence.

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from Vedeu::Translator

Instance Method Details

#named_codesString (private)

Returns:

  • (String)


10
11
12
# File 'lib/vedeu/output/background.rb', line 10

def named_codes
  Vedeu::Esc.background_codes[colour]
end

#numbered_prefixString (private)

Returns:

  • (String)


15
16
17
# File 'lib/vedeu/output/background.rb', line 15

def numbered_prefix
  "\e[48;5;"
end

#repositoryVedeu::BackgroundColours (private)



20
21
22
# File 'lib/vedeu/output/background.rb', line 20

def repository
  Vedeu.background_colours
end

#rgb_prefixString (private)

Returns:

  • (String)


25
26
27
# File 'lib/vedeu/output/background.rb', line 25

def rgb_prefix
  "\e[48;2;%s;%s;%sm"
end