Program the belt to stop moving shortly after the color sensor detects your color for a short duration so that you can get the ball.