To get sensible help on this you will need to tell us how the RGB LED is wired up to the Leonardo
With a common cathode LED you connect the cathode to ground and connect each LED's anode through a resistor to an output pin. Then a HIGH turns it on, a LOW turns it off.