Connect the common anode to +5v and then simply change any calls of:
digitalWrite(pin, HIGH);
To:
digitalWrite(pin, LOW);
And vice versa.
That assumes you are not using transistors.
There is probably a better way to do it and that is to use some N MOSFETs (or NPN transistors). Connect the gate of the fet to the arduino pin, the source to GND and the drain to the LED. That circuit will act as an inverter which will do what you need whilst also protecting the arduino pins from having to sink as much current.