Using Ruby, how can I perform background and foreground text colorization for output in the terminal?
I remember, when programming Pascal we all used to write our own textcolor(…)
procedures to make our small educational programs look more pretty and presentational.
How would I go about coding an equivalent of that in Ruby?
Colorize is my favorite gem! :-)
Check it out:
https://github.com/fazibear/colorize
Installation:
gem install colorize
Usage:
require 'colorize'
puts "I am now red".red
puts "I am now blue".blue
puts "Testing".yellow