A color changing LED is a package of 3 LEDs along with small chip to drive them. Mainly color LED consist of red, green and blue LEDs which is controlled by a microcontroller. The power supplied to the microcontroller are by two legs on LEDs.
The microcontroller is ready to show every of the colors by turn on or off, therefore if the red LEDs is on then output is red color. Once the blue LED is turned on then output is blue. If the 2 LEDs is turned on at the same time then the output give the different color. For example red LED and blue LED is turned on, then the output is purple color. Similarly combining red with green LED gives yellow color output and blue & green LED gives cyan color output.
Color Changing LED gives six color output, it slowly changes from one to another. Often this is done using three basic element I.e Red, blue and green. If the red is combined with the blue LED, however the blue LED is merely driven at 50% of usual brightness giving the color in between red and magenta. If the blue LED is slowly taken from 0% to 100% brightness keeping the red LED turned on then color output will change from red to magenta.
It mean this technique can be used to combine any amount of the red, green and blue to give the desired colour output..