Nevertheless! Party Metaphorically
Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

gm-color-parser

0.1.2 • Public • Published

color-parser

CSS color string parser, forked from component/color-parser

Installation

Browserify/NPM

    $ npm install --save gm-color-parser
  var parse = require('gm-color-parser');

Component

    $ component install charlottegore/color-parser
  var parse = require('color-parser');

Example

var parse = require('color-parser');
 
parse('#fc0')
// => { r: 255, g: 204, b: 0, a: 1 }
 
parse('#ffcc00')
// => { r: 255, g: 204, b: 0, a: 1 }
 
parse('rgb(255, 204, 0)')
// => { r: 255, g: 204, b: 0, a: 1 }
 
parse('rgba(255, 204, 0, 1)')
// => { r: 255, g: 204, b: 0, a: 1 }

License

MIT

Install

npm i gm-color-parser

DownloadsWeekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • avatar