Class: Vedeu::Background
Overview
The class represents one half (the other, can be found at Foreground) of a terminal colour escape sequence.
Instance Method Summary
collapse
Methods included from Coercions
#coerce, #coercer, included
Methods included from Common
#defined_value?, #to_sentence
Instance Method Details
#named_codes ⇒ String
11
12
13
|
# File 'lib/vedeu/output/background.rb', line 11
def named_codes
Esc.background_codes[colour]
end
|
#numbered_prefix ⇒ String
16
17
18
|
# File 'lib/vedeu/output/background.rb', line 16
def numbered_prefix
"\e[48;5;"
end
|
#rgb_prefix ⇒ String
21
22
23
|
# File 'lib/vedeu/output/background.rb', line 21
def rgb_prefix
"\e[48;2;%s;%s;%sm"
end
|