Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed Nov 27, 2009
1 parent 7b21379 commit 74f0486
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.markdown
Expand Up @@ -21,14 +21,23 @@ Rainbow adds following methods to String class:
* inverse
* hide.

Color can be one of following symbols: :black, :red, :green, :yellow, :blue, :magenta, :cyan, :white and :default.

Each of those methods returns string wrapped with some ANSI codes so you can chain calls as in example above.

Color can be one of following symbols:

:black, :red, :green, :yellow, :blue, :magenta, :cyan, :white, :default

If you have 256-colors capable terminal you can also specify color in RGB which will find the nearest match from 256 colors palette:

"Jolacz".color(115, 23, 98)
"Jolacz".color("#FFC482")
"Jolacz".color("FFC482")

It also has Windows support (uses win32console gem if installed, otherwise strings are returned unaltered).

Usage
-----

require 'rainbow'
puts "this is red".foreground(:red) + " and " + "this on yellow bg".background(:yellow) + " and " + "even bright underlined!".underline.bright

0 comments on commit 74f0486

Please sign in to comment.