closest-color-keyword
v1.1.0
Published
Get the closest CSS color keyword for a given value
Downloads
2
Readme
closest-color-keyword
Returns the closest CSS color keyword based on a color value
npm install closest-color-keyword
var keyword = require('closest-color-keyword');
var name = keyword('#f00'); // 'red'
Options
basic
Default false
Returns a keyword from the CSS1 values for simpler names.
var name = keyword('#228b22', { basic: true });