To be explicit, the question is not about how to extend the number of GPIO pins,
but is about the way to change the plus/minus voltages applied to a set of pins.
It's not really possible to separate the two. There are many ways to solve the problem, but the best one will depend on how many IO pins you have available and what kind of control you want to have over the LEDs.
Do you need to be able to turn individual LEDs off as well, or just select one of two colors? If you just need one color or the other, then you could use a single IO line per LED, route that directly to one side of the LED, and then through an inverting buffer to the other side of the LED. The state of the IO pin then selects the color. If you need to be able to turn LEDs off as well, then you can connect one side of the LEDs all together, drive that side with a pair of transistors (sufficient to handle the combined current of all of the LEDs), and then wire the other side of each LED to an independent IO line. Set each of those IO lines high for one color, low for the other color, or tristate for off, and then toggle the common side between high and low. That effectively multiplexes the LEDs by color, so all of the LEDs set to color A will be on, then all those set to color B, etc. You can use fewer IO lines by multiplexing somehow, but that's challenging with bipolar LEDs -- in any sort of matrix arrangement, there will be parasitic paths that will carry current through LEDs that should be off, and they might light up when you don't want them to. Modern LEDs are crazy efficient, and can visibly glow at surprisingly low votlage/current.
Are you trying to control the brightness as well or just the color? Generally you wouldn't change the voltage to change the brightness -- if you want analog dimming, then it's better to control the current through the LEDs rather than the voltage. But it takes fewer components to do the dimming digitally, by controlling how much time each LED is on. Exactly how you accomplish that will again depend on how they are connected.