The essay I read on skin color says that dietary sources of vitamin D and folate plays a big role. As well as prehistoric population migrations.
There are dietary sources of Vitamin D and it's produced via Sun exposure. Folate levels are reduced by sunlight exposure. And there are dietary sources. So the two are in conflict vis sun exposure.
Because of the mild climate you can grow grains in northern Europe. That diet is low in Vitamin D and high in folatess. As a result Northern Europeans rapidly lost the ability to produce melanin over the last 5000 years.
On the other hand there are no black skinned native Americans because the founding population had already lost some of the genes needed.
We do not really know how dark or light early hominids were.