Dual Color LEDs
Lead In
Multi-color LEDs look similar to the single-color type, apart from the 3 or more pins instead of the two. They are ideal for use as indicators if, for example, the system needs to indicate a change of state.
Changing the Color
The dual-color LED is illuminated in the same way as a regular LED. Power is applied to the anode with the anode connected to GND or 0Vdc. A current limiting resister would be required as described in Powering an LED๏ปฟ, with the exception that two resistors would be needed. one for each LED.

Code Sample
The following code sample illustrates how a dual-color LED can be implemented.
Device: PIC16F1827 | 1847
Development Board: Radix Nano 18
#define RED PORTB.B0
#define GREEN PORTB.B1
void Setup(){
ANSELA=0x00;
ANSELB=0x00;
TRISB = 'b1111100;
PORTB = 0x00;
C1ON_bit = 0; // Disable comparators
C2ON_bit = 0;
}
void main(){
Setup();
while(1){
RED = 1;
GREEN = 0;
Delay_MS(500);
RED = 0;
GREEN = 1;
Delay_MS(500);
}
}
Other Options - RGB
The RGB LED can be used to produce different colors and is similar in principle to the LED screen. Depending on the intensity of the various base colors, different colors can be produced.

Lead Out
Multi-color LEDs are an interesting way to implement different colors using a few LEDs. With intuitive programming, they can be used effectively in a system application.