Semicolon at the end of a for loop makes it pretty pointless. Perhaps you should try removing it and surrounding the code that you wish to loop with curly braces.
for (int i=0; i<3; i++);
pinMode(rgb[i], OUTPUT);
pinMode(switchPin, INPUT);
The variable i is only defined for the scope of the loop. That is outside the for loop i is an undefined variable.
As the for loop ends at the ; then the following two lines are not in the for loop and therefore use an undefined variable.
Always use curly braces and never use one line thing as the reason is provided here. And you will always find yourself add more code under if and for so you will have to add the curly braces anyway. Computer doesn't mind the extra lines.