Its easy to get started by just include the sweep.js, call sweep() function with target to animate, CSS properties, fromColor and toColor. That’s all you need to do to create smooth color changing animation.
Thanks Riley Shaw for this small color script for free and open source.
sweep.js is released under MIT license.
Source: Read more about sweep.js