A color contrast optical illusion makes it look like the balls are different colors. In reality they are all the same color and shading.
In a nutshell, we do perceive colors as they stand on their own, but also by contrast with colors around them. If I put up an image of a red square, then (assuming you have normal color vision) it looks red. But if I put up objects with other colors around it, the color we perceive changes a bit. That can be manipulated using stripes of different colors, for example. In the top row, note the colors of the stripes going across the balls. The left one has green stripes, the middle one red, and the right one blue. That changes how we see the balls.
This is called the Munker-White illusion (or sometimes just the Munker illusion), and it’s a powerful one. When you’re not looking directly at the balls, the color of the stripes pulls the color of the ball toward it, in a manner of speaking, so the green stripes make the ball look greener. It’s weird.