The ball changes to a random colour when it hits an edge or when the mouse is clicked. It also leaves a slight trail behind it as it moves.
View the code on GitHub