Reduced color.js lib usage to three functions