Programming Question

Check out Bionic Arduino – Introduction to Microcontrollers with Arduino – todbot blog

There is a sketch for a RGB mood light where it cycles the intensity of each pin of the RGB led in a similar fashion to fade through different colors. Perhaps you could modify this code to achieve your goal.

That or i have no idea what you are atempting ;D.