A brief history
The very first traffic light was actually installed in Parliament Square, Westminster, London on 9th December 1868, a long time before the invention of the motor car. Consisting of a gas lamp on a revolving pillar, it had only two colours, red for 'Stop' and green for 'Caution'. It was operated by a policeman who turned it with a lever, so that the appropriate light faced the traffic. Sadly, on 2nd January 1869, it exploded, injuring the constable operating it.
A Detroit, US police officer, William Potts, devised a method of controlling traffic using electric lights. Using the same light colours (red, amber and green) used in railway signals, he installed his device on the corner of Woodward and Michigan in 1920. A year later, Detroit had fifteen such manual traffic lights.
In 1923, Garrett Morgan (reportedly the first African American to own a car in Cleveland, Ohio), designed and built the automatic traffic light. His semaphore design was superceded by the familiar three-light system still in use today, but the principles of operation remain unchanged.
Wolverhampton was the first city in the UK to use electric traffic signals. Installed in November 1927 in Prince's Square, they paved the way for similar signals throughout the UK.