This example illustrates the appearance of different hues. It uses a for loop to repeat transformations. The loop initializes a variable called angle, which changes the rotation of a circle as well as its hue. Each time the loop repeats, a circle is drawn relative to the center of the canvas. The push() and pop() functions make these transformations affect only the individual circle.
Color Wheel by p5.js Contributors and the Processing Foundation is licensed under CC BY-NC-SA 4.0.