ku1ik / rainbow

Ruby gem for colorizing printed text on ANSI terminals
MIT License
813 stars 68 forks source link

X11 color support #26

Closed sato-s closed 8 years ago

sato-s commented 8 years ago

X11 color names is well known to programmers and designers because CSS can take care of this color names.
I thought it's good for us to take advantage of this famous color names. Giving "aqua" is much more intuitive than giving RGB array. This patch adds an ability to specify Rainbow("hello").color(:aqua) or Rainbow("hello").aqua
X11 color names are not supported on ANSI terminal. This is just a syntax sugar for RGB Array. Color specified with an ANSI name are effected by terminal setting but RGB Arrays are not. So I keep existing behavior of ANSI names and documented this behavior.
How do you think of this?

ku1ik commented 8 years ago

Looks great. Thanks!