You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			|  | 4 years ago | |
|---|---|---|
| .. | ||
| FEEL-FREE.md | 4 years ago | |
| LICENSE.md | 4 years ago | |
| README.md | 4 years ago | |
| index.js | 4 years ago | |
| package.json | 4 years ago | |
		
			
				
				README.md
			
		
		
	
	node-rgbcolor
A nodejs module to parse color values Based on rgbcolor.js by Stoyan Stefanov sstoo@gmail.com http://www.phpied.com/rgb-color-parser-in-javascript/
Usage
var RGBColor = require('rgbcolor');
var color = new RGBColor('darkblue');
if (color.ok) { // 'ok' is true when the parsing was a success
    // log channels
    console.log(color.r + ', ' + color.g + ', ' + color.b);
    // log HEX and RGB
    console.log(color.toHex());
    console.log(color.toRGB());
}