Class: Vedeu::Foreground
Overview
The class represents one half (the other, can be found at Background) 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
15
16
17
|
# File 'lib/vedeu/output/foreground.rb', line 15
def named_codes
Esc.foreground_codes[colour]
end
|
#numbered_prefix ⇒ String
20
21
22
|
# File 'lib/vedeu/output/foreground.rb', line 20
def numbered_prefix
"\e[38;5;"
end
|
#rgb_prefix ⇒ String
25
26
27
|
# File 'lib/vedeu/output/foreground.rb', line 25
def rgb_prefix
"\e[38;2;%s;%s;%sm"
end
|