Skip to content
Browse files

simple take example

  • Loading branch information...
1 parent 39f2a10 commit dc5c00b303910b4a9b23b92dd4f9a51f63a4c1d1 @substack committed Jul 10, 2011
Showing with 39 additions and 0 deletions.
  1. +35 −0 README.markdown
  2. +4 −0 example/take.js
View
35 README.markdown
@@ -9,6 +9,41 @@ different the more colors you load.
The hue is deterministic but the saturation and luminosity vary increasingly
randomly the more colors are generated.
+examples
+========
+
+example/take.js
+---------------
+
+````javascript
+var mr = require('mrcolor');
+mr.take(18).forEach(function (color) {
+ console.log('rgb(' + color.rgb().join(',') + ')');
+});
+````
+
+output:
+
+ $ node example/take.js
+ rgb(254,1,1)
+ rgb(255,255,0)
+ rgb(0,255,0)
+ rgb(1,254,254)
+ rgb(0,0,255)
+ rgb(255,47,255)
+ rgb(226,113,0)
+ rgb(214,54,0)
+ rgb(109,217,1)
+ rgb(0,243,121)
+ rgb(4,129,255)
+ rgb(84,1,167)
+ rgb(198,0,99)
+ rgb(255,206,62)
+ rgb(112,254,65)
+ rgb(0,181,135)
+ rgb(0,39,154)
+ rgb(213,89,255)
+
methods
=======
View
4 example/take.js
@@ -0,0 +1,4 @@
+var mr = require('mrcolor');
+mr.take(18).forEach(function (color) {
+ console.log('rgb(' + color.rgb().join(',') + ')');
+});

0 comments on commit dc5c00b

Please sign in to comment.
Something went wrong with that request. Please try again.