generate-palette
v1.0.4
Published
Generate palette from input color
Downloads
14
Readme
generate-palette
Generate collor palette by input color and step:
Installation
This is a Node.js module available through the
npm registry. Installation is done using the
npm install
command:
$ npm install generate-palette
Or to install globally:
$ npm install -g generate-palette
TypeScript
This module includes a TypeScript
declaration file to enable auto complete in compatible editors and type
information for TypeScript projects. This module depends on the Node.js
types, so install @types/node
:
$ npm install @types/node
API
var generatePalette = require('generate-palette');
generatePalette(color, [step])
Returns a object that contains color palette.
Parameters:
color
- The domain color of palett in HEX format.step
- Ths step of concentration in palette. It should be between 0 and 100.
Examples
Example of usage
var generatePalette = require('generate-palette');
var palette = generatePalette('#FFDD00', 10);
Example of CLI usage
generate-palette --color '#87CEEB' --step '10'
Or in JSON format:
generate-palette --color '#FFDD00' --step '10' --json