grab-color-names

1.1.3 • Public • Published

grab-color-names

travis build npm

Get an array of 1500+ color names. Alternatively get a single random color, or specify the amount of random colors to return.

alt tag

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.

Readme

Keywords

Package Sidebar

Install

npm i grab-color-names

Weekly Downloads

3

Version

1.1.3

License

MIT

Unpacked Size

130 kB

Total Files

10

Last publish

Collaborators

  • marinda