1.0.2 • Published 7 years ago

color-type v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

color-typeBuild Status

Helper function to detect the color type/model (HEX, RGB, HSL).

Install

$ npm install --save color-type
$ bower install --save color-type
$ component install hemanth/color-type

Usage

Node.js
var ct = require('color-type');

cm.is('rgb(255,255,255)'); //'rgb'
cm.is('#FFF'); // 'hex'
cm.is('hsl(0,100%, 50%)'); // 'hsl'

cm.isHSL('hsl(0,100%, 50%)'); // true
cm.isRGB('rgb(255,255,255)'); // true
cm.isHEX('#FFF'); // true

License

MIT © Hemanth.HM