Screens speak of color in terms of 3 channels: Red, Green and Blue. Humans tend to think of colors in 3 channels too, but the channels that seem more natural usually are Hue, Saturation and Brightness. Here is an arduino color library so you too can specify colors by their hue! We use this code in our RGB Rainbow Sun and HSB RGB Sketcher. If you need help learning how to install libraries in arduino check out this thorough Adafruit tutorial. We use this library to draw colors on LCD screens, for example see the HSB RGB Sketcher Tutorial and onto RGB LEDs in the Sun Kit.
HSB RGB Arduino Color Library
This code show a basic example of using the color library to make a rainbow appear on RGB LEDs. By varying the hue the rainbow function moves across the whole visible color spectrum.
For more detail: HSB RGB Arduino Color Library