Coloured rails?

Twice I’ve seen these coloured patches on the rails, and I’m not sure what their purpose is…

The first shot is at the east end of a siding, taken from the north, and the second one is the west end of a siding 40 miles west, taken from the south. And ideas why they’re there? As a reference, the SE rail is always green. Also, this stretch had some new ballast put on the sides a couple months ago, and I assume the rails were painted that way a the time. (I also assume that the wiring was sub-ballast before)

I would suppose that the track circuit had to be broken for maintenance, so they colored each wire and corresponding rail so they could be put back properly. Mudchicken?

The track wires are removed to facilitate track work, and color coding the insulated joint end and wire plugs are a quick and easy way to ensure the wires are going back to the same rail they came out of.

Laurence