gmile gmile - 2 years ago 138
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?

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download