JavaScript micro library to generate gradient color stops 🏳️‍🌈
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
src
.babelrc
.gitignore
LICENSE
README.md
gradient strip.png
gruntfile.js
package.json
webpack.config.js
yarn.lock

README.md

GradStop.js

JavaScript micro library to generate gradient color stops

Demo Download

Usage:

var 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.

Development

  • Install dependencies
    npm install or yarn
  • Start JS compilation
    npm run dev
  • Build
    npm run build