gmile gmile - 1 year ago 96
Ruby Question

Colorized Ruby output

Is there a proper plugin or a class to perform background and foreground text colorization within a common output console?

I remember, when programming Pascal we all used to play with

procedures to make our small educational programs look more pretty and presentational.

Is there anything similar in Ruby?


Colorize is my favorite gem! :-)

Check it out:


gem install colorize


require 'colorize'

puts "I am now red".red
puts "I am now blue".blue
puts "Testing".yellow