Hey Fred, pretty good explanation, but I have a photograph somewhere of a leased loco on the CSX "S" line, now Florida's Sunrail line, and it literally had settings for white, green and red, it was 3 lenses and 3 bulbs in a triangular position.
I forgot what road it was, will have to see if I can find that photo, but when I talked to the engineer about those lights, got basically close to the same explanation you stated with one exception I forgot about, but just recalled, was told that some engineers or conductors would turn them on for certain railfans {those they called foamers}, because turning them on, they'd just get some of them so excited seeing those lights in operation, and they'd usually turn them on green forward and red backward if the loco had them. just to observe the reaction of certain railfans of their roadside fan club.


At least that's ONE explanation that makes sense today if a loco is so equipped with those classification/marker lamps, but like stated also, newer models don't have them as there is no need of them. Usually only found on older loco's.
Greg, yea, I like F.R.E.D.'s those are cool, the whole thing is a very sophisticated computerized control monitoring system {in a very small box} of some of the issues a train could encounter, broken brake lines or air lines will set the train into automatic emergency stop, broken electrical connection will send a message to the console in the cab, as did the broken air/brake line.
All wirelessly sent to the cab, yet if I recall I believe there is an external power connection on the box, but rarely is it used. Especially since I've seen some very dimly blinking F.R.E.D's on the rear end of trains,saying it's time to replace the battery, and it also tells the crew in the cab that too when it gets to the point of almost too weak to transmit or operate.
At least that's what I was told by a gentlemen that builds these devices for the railroads. Oh, and a F.R.E.D. flashing light isn't always red either, they can also be amber or yellow, but do the same job. I've seen amber F.R.E.D.'s many times on the rear end of trains.