The crossing shanty was a classic railroad structure that sheltered the employee who would protect the motoring public from passing trains. The building offered rather primitive comfort from the weather but provided some comforts such as stove to keep warm and make coffee. They were usually painted in the roads standard colors. The lead picture was taken from the Google online Life magazine photo collection. The shanty was located on the C&NW in Chicago.
The structure shown below was a Southern Pacific shanty located in San Francisco near their main passenger station. The diminutive structure was painted Colonial Yellow, Light Brown trim with White windows. The roof was a medium green. It seems that shack is a gathering place for conversation with crew members and locals. The crossing tender looks like he had a garden along one side.
I found another shot of a crossing shanty in College Park near Santa Clara on the SP. This fellow must have been busy since the Coast Division main support through freights and passenger trains as well as busy commute traffic.
Some railroads resorted to elevated crossing shanties to protect certain situations. The shanty shown below was on the Soo at Neenah, WI. The building was preserved and moved to the Mid Continent Railroad Museum.