source: imaps-frontend/node_modules/rgbcolor/README.md

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 498 bytes
Line 
1# node-rgbcolor
2
3A nodejs module to parse color values
4Based on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>
5http://www.phpied.com/rgb-color-parser-in-javascript/
6
7## Usage
8```` js
9var RGBColor = require('rgbcolor');
10
11var color = new RGBColor('darkblue');
12
13if (color.ok) { // 'ok' is true when the parsing was a success
14 // log channels
15 console.log(color.r + ', ' + color.g + ', ' + color.b);
16 // log HEX and RGB
17 console.log(color.toHex());
18 console.log(color.toRGB());
19}
20````
Note: See TracBrowser for help on using the repository browser.