I was born in France, so I remember as a kid when everyone drove their car with yellow headlights. My father explained be that contrast gave a better night vision and reduced eye fatigue;
The other explanation sounds way more plausible, given the fact how the headlights evolved:
In the late 30's France was threatened by Germany, so some measure allowing as early warning as possible was required.
As the main logistic of the military was car transport, the requirement was to identify German cars and distinguish them from the local French ones.
As the invasion was expected to happen at night, someone got an idea to have all French cars different headlight color. And the clearly different color without loosing that much light is then the yellow. So the German cars were very easy to identify by their white headlights.
Obviously the real reason for such measure was supposed to be kept secret, so the cover story abut the "better visibility".
After the war the original need disappeared, but another came: Protect the French car industry from imports. The need to develop yellow lights was not that easy to justify when only low sale volumes are expected when introducing new brand was quite strong barrier, at least against smaller companies and/or cheaper product lines (Beetle,...). So the requirement for yellow headlights was kept in place, with the same "cover story", till the end of the century. In fact the only motivation to lift up that requirement was the "open market" idea, quite pushed through the Europe by France at that time, while with that yellow headlight law it was quite difficult for the French diplomacy to push those "open market" agreements, mainly towards Germany...