Generate collor palette by input color and step:
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
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
var generatePalette = require('generate-palette');
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.
var generatePalette = require('generate-palette');
var palette = generatePalette('#FFDD00', 10);
generate-palette --color '#87CEEB' --step '10'
Or in JSON format:
generate-palette --color '#FFDD00' --step '10' --json