Sets background color of this text.
# File lib/rainbow.rb, line 38 def background(*color) color = color.first if color.size == 1 wrap_with_code(get_color_code(color, :background)) end
Turns on blinking attribute for this text (not well supported by terminal emulators).
# File lib/rainbow.rb, line 66 def blink wrap_with_code(TERM_EFFECTS[:blink]) end
Turns on bright/bold for this text.
# File lib/rainbow.rb, line 51 def bright wrap_with_code(TERM_EFFECTS[:bright]) end
Sets foreground color of this text.
# File lib/rainbow.rb, line 29 def foreground(*color) color = color.first if color.size == 1 wrap_with_code(get_color_code(color, :foreground)) end
Hides this text (set its color to the same as background).
# File lib/rainbow.rb, line 76 def hide wrap_with_code(TERM_EFFECTS[:hide]) end
Inverses current foreground/background colors.
# File lib/rainbow.rb, line 71 def inverse wrap_with_code(TERM_EFFECTS[:inverse]) end
Turns on italic style for this text (not well supported by terminal emulators).
# File lib/rainbow.rb, line 56 def italic wrap_with_code(TERM_EFFECTS[:italic]) end
Generated with the Darkfish Rdoc Generator 2.