Skip to content

mwoodsy/pwm-color-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwm-color-parser

JavaScript parser for PWM color values

Installation

npm install pwmcolorparser

Sample

var pwmColorParser = require('pwmcolorparser');

console.log(pwmColorParser.parseHex('#FF0000')); // outputs [100, 0, 0]
console.log(pwmColorParser.parseRGB([255, 0 , 0])) // outputs [100, 0, 0]
console.log(pwmColorParser.parseColor('red')); // outputs [100, 0, 0, 1]

About

JavaScript parser for PWM color values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published