Class: TTYHue::TermColor::Gui
Instance Method Summary collapse
- #color_name ⇒ Object
-
#initialize(code) ⇒ Gui
constructor
A new instance of Gui.
- #tag_name ⇒ Object
- #term_hex(bg) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(code) ⇒ Gui
Returns a new instance of Gui.
63 64 65 |
# File 'lib/ttyhue/term_color.rb', line 63 def initialize(code) @code = code end |
Instance Method Details
#color_name ⇒ Object
67 68 69 |
# File 'lib/ttyhue/term_color.rb', line 67 def color_name "gui_#{@code}".to_sym end |
#tag_name ⇒ Object
71 72 73 |
# File 'lib/ttyhue/term_color.rb', line 71 def tag_name "gui#{@code.to_s}" end |
#term_hex(bg) ⇒ Object
75 76 77 78 |
# File 'lib/ttyhue/term_color.rb', line 75 def term_hex(bg) prefix = bg ? "48;5;" : "38;5;" prefix + @code.to_s end |