Skip to content

aurer/jsgradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jsgradient.js

The jsgradient plugin The easiest way to implement a gradient is by calling the gradientList() function, specifying the start color, end color and list element you want to style like so:

jsgradient.gradientList('#07E3F2', '#155994', '#demo');

You can pass in the colors in the following formats: ‘fff’, ‘#fff’, ‘ffffff’ or ‘#ffffff’. The list element can also be passed in as a string like above or as a DOM element e.g.

jsgradient.gradientList('#07E3F2', '#155994', document.querySelector('#demo'));

You can also call the generateGradient() function as the example below shows and this will return the array of hex colors for you do use however you like.

jsgradient.generateGradient('#07E3F2', '#155994', 10);

About

Generate an array of hex values blending two specified colors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published