You've declared and initialized your color variable inside of the for loop. So even though you increment it, it reverts back to 1 with every iteration of the loop.