grab-color-names
Get an array of 1500+ color names. Alternatively get a single random color, or specify the amount of random colors to return.
Usage
commonjs modules -
var getColors = require('grab-color-names');
// Get all colors : array of 1500+ colors
var colorArray = getColors.all;
var oneRandomColor = getColors.randomColor(); // [ 'C4F4EB', 'Mint Tulip' ]
var fiveRandomColors = getColors.randomColor(5); // array of 5 random colors
ES2015 modules -
import {allColors, randomColor} from 'grab-color-names';
var colorArray = allColors, // array of 1500+ colors
oneRandomColor = randomColor(), // [ 'C4F4EB', 'Mint Tulip' ]
fiveRandomColors = randomColor(5); // array of 5 random colors
API
- .all
- .randomColor()
- .randomColor(x)
Installation
npm install grab-color-names
License
MIT
Attributions
Color list compiled by Chirag Mehta http://chir.ag/projects/name-that-color/
The color names in this list were found via Wikipedia, Crayola, and Color-Name Dictionaries like Resene.