Drive a common anode bi color LED using single microcontroller pin
Given the Forward voltage differences between Red and Green LEDS allows for a very simple circuit and using your Common Anode configuration. 









simulate this circuit &ndash; Schematic created using CircuitLab

You can set your LED current to any value you want, but there will always be a variation between Red - Green current that is unavoidable. 

How well this works for you will depend on how the Red/Grn LEDs are built. For example with this Common Anode LED the difference between the Grn/Red VF is as shown below:



With this bi-color at any current below 30 mA through the Red LED, the Green LEED will be essentially off (uA). 
If you are using discrete LED's this will work for almost all devices. but note that some newer SMD bi-color LEDs use a mixed technology and the VF's are much closer together, for those devices this drive architecture may not work. 

Update: after doing some tests with various LEDs, here's a way to handle diodes with no difference in Vf. In addition this can be used if you are using diode currents (typically &lt;20 mA) that can be handled directly by a microprocessor pin. 







simulate this circuit