Skin blackening is determined by human genes, and is also affected by the intensity and time of ultraviolet radiation.
Although most black people live in tropical areas with strong ultraviolet radiation, black people have a lot of melanin, which can resist ultraviolet radiation well, so the probability of black people suffering from skin cancer is very small, almost none, which is the advantage of black skin.