It's not just one color. This is a huge piece of the problem. You need to REWIRE the loco because natively, headlight and smoke unit are tied to the motor via diodes. Going a step further, TMCC boards like the R2LC and thus ERR upgrades outputs 3rd rail "hot" outputs for lights.
As stated, the native system in a PS2 steam engine, the lights would be connected to PV- positive unregulated track voltage via diodes connected to the motor AND the PS2 control board PWM grounded the return line from the bulb to PWM approx 6V equivalent pulsed DC across the 6V bulb.
So no part of that is just you figuring out a single wire.
Again, you have to disconnect ALL of that. You have to remove the diodes or remove the PV wiring from BOTH the smoke unit heater resistor feeds, AND the headlight. You then have to change the bulb, and if doing that, have to change the wiring scheme to then frame ground the bulb socket to match typical ERR TMCC wiring, and use an 18V bulb.