Method: Common::Color#colorize_background

Defined in:
lib/common/color.rb

#colorize_background(text, color) ⇒ Object

Colorize the text in backgroung.

Parameters:

  • text

    The text to color.

  • color

    The color.

Author:

  • tmarmin



31
32
33
# File 'lib/common/color.rb', line 31

def colorize_background(text, color)
  return "\033[48;5;#{color}m#{text}\033[0m"
end