Order and safety measures taken by law enforcement are extremely necessary to maintain a peaceful environment in a place. Numerous various methods are utilized to get done with it, out of which traffic light system is the one that is utilized on the roads. The usage of this very system goes back to the dates when there were no signs of cars on the streets. Yes, originally traffic lights were used for the trains and the selection of colours also came from there. 

Colour history of traffic lights: 

As we are aware of the fact that trains are the big brother of cars, and all the other sorts of vehicles, hence, the origin of the traffic lights in Melbourne and the selection of the colours must be related to them. So, these lights were initially used to in pair of two to signal the coming train whether the area ahead is safe to enter or not, or there is another train trans passing the area. One light would signal the danger and the other would signal the safety. 

Red:

The red colour was chosen just because its wavelength is the largest in all the colours and henceforth is visible from quite a distance even in dark hours. Because the trains are moving with high speed which makes them dangerous to stops abruptly upon seeing the signal and train takes a bit longer to stop safely, therefore it should be signalled in a way that makes possible for the driver to prepare and slow down the train on time. For this very reason, the red colour was used. 

Yellow:

Then the colour yellow entered this business. After red, yellow is the colour that is quite easily visible in the dark from far away. In those early signal lights were lit by the gas, so in often places it was difficult to lit a red light through gas, hence they switched to yellow. Even now when there is a need for light signals to let people know about the danger, red and yellow are the colours that are used to avoid any kind of accident. 

Green:

Just like yellow and red are easily visible, so is green but not as easy as the other two and this is why green was and is used to depict the safe to move colour. 

Modern-day traffic light: 

Modern-day traffic lights are a combination of all three colours. Red is to signal the prohibition from moving forward in the traffic. Yellow is used for various reasons like, to signal caution, hazardous area and to be careful. Then green is used to signal the safe to move forward. Nowadays there other several colours to in use to indicate various things like a separate lane for bus and several more. Go right here to find out more details.