2.2.3 • Published 5 years ago

gradstop v2.2.3

Weekly downloads
18,710
License
MIT
Repository
github
Last release
5 years ago

gradstop

JavaScript micro library to generate gradient color stops

DemoUMD 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)

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.

Polyfills required:

  • Math.trunc
2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.6

5 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago