rubikon icon indicating copy to clipboard operation
rubikon copied to clipboard

Support for colored output

Open koraktor opened this issue 15 years ago • 2 comments

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 avatar Oct 11 '10 15:10 koraktor

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 avatar Oct 19 '10 14:10 koraktor

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

koraktor avatar Jan 27 '11 07:01 koraktor