A traffic light usually remains yellow for a few seconds. However, the exact time depends on the location of the light. For example, in New York City, the Administrative Code requires that traffic lights remain yellow for 2 to 3 seconds.
In California, the time span of a yellow light depends on the speed limit, but it's typically 4.2 seconds. In Texas, the light lasts for 4.7 seconds if the intersection's speed limit is 50 mph or higher. In New Jersey, the law requires that yellow lights last for 4 seconds. One motorist in New Jersey who received a ticket after being photographed by a red light camera was able to overturn the ticket by timing the duration of the traffic light's yellow phase. He found it to be 3 seconds long instead of 4.