All in the project :D
It uses the "if on edge then bounce" block, basically if the balls touch a certain color, the distance between the ball and the edge is calculated and its position stored in a variable. The ball then jumps to the edge and calculates the rotation with the built in block. Then, the ball goes back to its original position stored in the variable.