In case you just want the color code, without the embedding and the CLEAR sequence.
s = HighLine.Style(:red, :blue) s.code # => "\e[31m\e[34m" HighLine.color_code(:red, :blue) # => "\e[31m\e[34m" cli = HighLine.new cli.color_code(:red, :blue) # => "\e[31m\e[34m"
Parameters:
Returns:
ANSI escape code for the given colors.
348 349 350
# File 'lib/highline.rb', line 348 def color_code(*colors) HighLine.Style(*colors).code end