If anyone does want to know how to do this by converting between HSL and RGB, I made an example some time ago:
http://www.sketchy.co.nf (see "Hue Cycle")