Permalink
Browse files

Update readme

  • Loading branch information...
1 parent 7b21379 commit 74f048684da6530fe29233d473c71fb8180f9429 @sickill committed Nov 27, 2009
Showing with 11 additions and 2 deletions.
  1. +11 −2 README.markdown
View
@@ -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.