Locomotive headlights and class lights
Aside from required ditch lights on most locomotives today, extra lights are essentially gone from freight locomotives, but if you look hard enough you can still find traces of the past when additional lights were ordered by railroads.
Before the era of locomotive standardization, many railroads chose to equip their locomotive with additional lights. Some equipment remained from the days freight railroads were still in the passenger business, while other railroads had safety in mind when installing additional lights on their power. Pyle Gyralite, Mercor Oscitrol, and Mars Lights were some of the most common designs.
Southern Pacific placed multiple sets on a locomotive, with the upper clear lights between the number boards used in daily service and a red Gyralite in the nose that automatically activated in situations such as when the train’s air brakes was placed in emergency. Other railroads had similar setups, though many would simply use a single red or clear bulb, or in a two-headlight case, either two clear bulbs or one clear and one red, using the former in train service and the latter in emergency situations.
Class lights on a locomotive are a holdover from an era where scheduled and extra trains were operated across a territory, using different colored marker lights or flags to denote what section the train was operating as. These relics are largely gone from locomotives in the industry, but a handful of U.S., and Canadian units still have them in place, either in operating condition or painted over.
When these class or extra lights are removed from an engine, shops would either simply remove and plate over the existing hole or weld up the area to match the shape of the locomotive. Plated-over light locations on locomotives can still be found today and are often a visual clue to the original owner of the locomotive.
A few words on how marker lamps were changed and the usual use of colored markers might be useful. WHITE for running extra you mentioned. GREEN for Section Following. Last seen on the B&M March 17, 1979—for St. Patrick’s Day!. But what variations in use/meaning were there? Red Arrow used YELLOW for the front end and RED for the rear end markers of their 1932 and later interurban cars–but the center-door cars and earlier cars had the red-green-white options on their markers. The Philadelphia Broad Street Subway used marker colors to identify trains branching to the Ridge Avenue Subway and other options.
Any other colors used in marker lights? European (and maybe British) railways used headlights plus lamp positions for train information; Spain and maybe Portugal did that.
I suspect with current scheduling concepts, the use of classification lights on mainline locomotives has gone the way of friction bearings. Other than excursions, it’s not likely you’ll see a train with any kind of flags or white lights up front to denote it as an extra. If locomotives need to move power around, then a train will see far more power than it would need, though I think the shifting locomotives are just “along for the ride”, up to where they might be needed.