
sweep.js is a vanilla JavaScript library which enables you to create smooth color transitions on any elements.
How to use it:
Insert the minified version of the sweep.js library into the html document.
<script src="bin/sweep.min.js"></script>
The basic JavaScript syntax.
sweep(target, properties, fromColor, toColor, options)
- target: target element to animate
- properties: CSS properties you wish to animate
- fromColor: initial color
- toColor: final color after the transition
- options: an array of options
Available options.
- callback: will be triggered once the animation finishes
- direction: clockwise (1) or counterclockwise (-1)
- duration: the duration of the animation.
- space: ‘HSL’, ‘HSLuv’, or ‘RGB’
Changelog:
10/10/2018
- Allow API to take an array of elements







