RGB LED Fading

I just attached RGB LEDs to the bottom of my drive train for an underglow. I am using motor ports because they output 7.2 volts rather than 5 volts and also the robot is just a small speed drive. I got it to light up static colors but im trying to make it spectrum cycling (like fading from red to green to blue). I am having trouble making them fade from different colors. if anyone could help that would be great!

I got it to fade but around 2 seconds of fading, it cuts out. I have the LEDs using motor ports in 3,4 and 6. It might be a problem with code, but i’m not sure. Here is the code I’m using

void fadefn(){
redval = 1;
greenval = 0;
blueval = 0;
for(int i=0; i < 10; i= i++){
motor[redLED] = redval100;
motor[greenLED] = greenval
100;
motor[blueLED] = blueval*100;

	drive();
	redval = redval - 0.1;
	greenval = greenval +0.1;
	wait1Msec(100);
}
for(int i=0; i < 10; i= i++){
	motor[redLED] = redval*100;
	motor[greenLED] = greenval*100;
	motor[blueLED] = blueval*100;

	drive();
	redval = greenval - 0.1;
	greenval = blueval + 0.1;
	wait1Msec(100);
}
for(int i=0; i < 10; i= i++){
	{
		motor[redLED] = redval*100;
		motor[greenLED] = greenval*100;
		motor[blueLED] = blueval*100;

		drive();
		redval = blueval - 0.1;
		greenval = redval + 0.1;
		wait1Msec(100);
	}
}

How do you have your LED strip wired up? Are you using a motor controller? Because the 3 wire motor ports are Battery-, Battery+, and the PWM signal. But I’ve never metered the output of a motor controller to see the voltage levels. I know you are using the LEDs with a common line and individual RGB power lines.