JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35704
  • Score
    100M100P100Q139737F
  • License MIT

JavaScript micro library to generate monotone color schemes and equidistant gradient stops

Package Exports

  • gradstop

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gradstop) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gradstop

NPM Version NPM Downloads License: MIT

JavaScript micro library to generate gradient color stops

Demo UMD Bundle

Usage:

npm install gradstop
import gradstop from 'gradstop';

const gradient = gradstop({
    stops: 5,
    inputFormat: 'hex',
    colorArray: ['#343838', '#00DFFC']
});

console.log(gradient);
// rgb(52,56,56), rgb(39,97,105), rgb(26,139,154), rgb(13,181,203), rgb(0,223,252)
Gradient Strip

Default Parameters:

  • inputFormat: 'hex' (supports hex, rgb and hsl)
  • stops: 5
  • colorArray: ['#fff', '#000'] (supports upto 4 values)

Both shorthand(#fff) and standard(#ffffff) format hex values are supported.