Inspired by http://buunguyen.github.io/rainbow.js/ and http://victorbjelkholm.github.io/ngProgress/