Proper PWM control of multiple LEDs sharing common +

Hi, Thanks for getting access to the forum. I am still an Arduino newbie, so please bare with my stupid questions. I am trying to soft-blink multiple LEDs in a model of a railroad signal.This would normally be entirely trivial, except that in this model the LEDs share common (+), not common GND.

What would be the proper way of dealing with this? My initial thought was just to connect the anode of the LEDs to Arduino 5V+ and just set (255-value) to the PWM output on the digital pin? Is it that simple, or is there any "best practice" for this use case?

Regards, StenR

StenR:
What would be the proper way of dealing with this? My initial thought was just to connect the anode of the LEDs to Arduino 5V+ and just set (255-value) to the PWM output on the digital pin? Is it that simple, or is there any “best practice” for this use case?

That’s about it, given no further details (quantity and so on).
Add 1 resistor for each LED element (R, B, G), not one for the whole device.
0 will be full on and 255 will be full off (which can be set the other way round in software).