RGB Led

How have you got it wired up that could be the problem.
It's common cathode so one way to wire that up is that the cathode should go to earth, with each anode through it's own resistor to each Arduino pin. Then a high turns it on.
It's either that or it is the software. Let's see it.

EDIT. I've just twiged what you have probably done. Wired all the anodes to the Arduino pins and then put one resistor in the cathode to ground. That would work exactly as you describe because the different colours of LED drop different voltages across them so ensuring only one will be on at once.