Each time a key is pressed, a different random set of colors is chosen.

Key 'e': Save a high-resolution PNG of the current image.

Key 'a': Increment the stroke width.

Key 's': Decrement the stroke width.

RIGHT_ARROW: Increment the number of hearts drawn.

LEFT_ARROW: Decrement the number of hearts drawn.

Mouse pressed: redraw.

The p5js code

This p5js code is scrollable.