Skip to content

A nodejs module to parse color values

Notifications You must be signed in to change notification settings

FlatIO/node-rgbcolor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

node-rgbcolor

A nodejs module to parse color values Based on rgbcolor.js by Stoyan Stefanov [email protected] 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());
}

About

A nodejs module to parse color values

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%