How can I generate a rainbow circle using HTML5 canvas?

This is not perfect (due to drawing steps …), but it can help you : http://jsfiddle.net/afkLY/2/ HTML: Javascript: The idea is to draw the disc line by line with a hue value corresponding to the line direction. You can change the color base rotation by adding a radius angle to rad variable (adding -pi/2 to rad would make the … Read more