You can accomplish the result with only 3 output ports. Connect Red led A and Green led B from port one to ground; Green led A and Red led B from port one to + 5V (pay attention to the polarity). Yellow led A to port 2 and Yellow led B to port 3. When Port one is High the green/red leds (correctly polarized will lit) when port one will turn low you will switch on the second set of green/red leds.
With port 2 and 3 you modulate the yellows.
Bookmarks