How can I loop between two custom colors?

I just want it to loop back and forth between green and red. Is there a setting for doing custom color loops?