This blog demonstrates how to drive a bi-color LED, or any 2 LEDs, by using only one microcontroller pin. Sinking or sourcing current from the LED selects which one will light up. Setting the pin as input turns both LEDs off.
Alternating between 0,1, and high-Z, both LEDs are fully controllable and even dimmable. The article also explains how to calculate the resistor values to get the desired current for the LEDs. The only drawback to this circuit is that consumption will increase because the voltage divider requires current even when the LEDs are off. [via]
Driving a bicolor LED from a single output pin – [Link]