Before making this, I tried fixing the original for personal use (I think this was before you took them over), but the code was so antiquated and difficult to read I gave up on it. I don't know if fixing the UPS loss is possible: it's a consequence of using the rendering engine. There are all sorts of weird quirks about it IIRC (for example, sometimes removing all renders and remaking them all is more efficient than removing one render), so it might not be possible to make it work well on a large scale. When I tried, it tanked my ~60 ups game to ~1 ups.
This variant uses entities instead: Spawning 4 small lamps around the entity in question. This avoids the rendering engine entirely, instead increasing the entity count. It also could impose a UPS impact at very large bases, but that can't be helped, except manually removing some of the redundant lights.
To fix your UPS problem, you'd probably need to follow in my tracks and change the approach entirely. At that point, the distinction between the two kinda vanishes...
Also, I don't see a reason to make a distinction between vanilla and modded buildings, I just slap them on on any compatible entity type, as long as it's bigger than a certain value.
Didn't Hazard lights already have a color option? I remember it definitely had some, not sure how well it worked though. My colors simply copy the color values the vanilla lamp can take off of signals.