Convert colors to websafe / websmart values
npm install color-quantize






Convert colors to websafe / websmart values
Install the module with: npm install color-quantize
``javascript`
var colorQuantize = require('color-quantize');
colorQuantize.websafe('#cd1289'); // "#CC0099"
colorQuantize.websmart('#cd1289'); // "#CC1188"
This library uses the onecolor parser,
so colorString can in many different formats (i.e. #ff00cc, rgb(13,42,255), etc).
#### colorQuantize.websafe(colorString)
Return a hex code from the 216 web-safe color palette.
colorString can be in any format supported by onecolor.
Same as calling: colorQuantize.quantize(colorString, 51)
#### colorQuantize.websmart(colorString)
Return a hex code from the 4096 web-smart color palette.
colorString can be in any format supported by onecolor.
Same as calling: colorQuantize.quantize(colorString, 17)`
#### colorQuantize.quantize(colorString, quantizeAmount)
Quantize a colorString by the given quantizeAmount.
colorString can be in any format supported by onecolor.
quantizeAmount must be an integer.
- 4096 Web Smart Colors
- Original Inspiration
#### v0.1.0 - Released June 21, 2014
- initial release