koraktor / rubikon

A simple to use, yet powerful Ruby framework for building console-based applications.
http://koraktor.github.com/rubikon
BSD 3-Clause "New" or "Revised" License
93 stars 2 forks source link

Support for colored output #9

Open koraktor opened 14 years ago

koraktor commented 14 years ago

This should provide an easy way to use terminal colors in output strings.

puts "#{Color.RED} This #{Color.BLUE} is #{Color.GREEN} a #{Color.YELLOW} colorful #{Color.BRIGHTRED} text#{Color.RESET}."

Maybe even auto-magically using specific tokens:

puts "%red This %blue is %green a %yellow colorful %brightred text%reset."
koraktor commented 13 years ago

This is in the works now and will find its way into development soon.

Right now, I prefer a syntax like that: puts "r{This} b{is} g{a} y{colorful} R{text}."

koraktor commented 13 years ago

This syntax found its way into version 0.6.0. No background colors etc. yet, though.