It is narrated from Abu Hurairah (may Allah be pleased with him) that a man from among the villagers came to the Prophet ﷺ and said: "My wife has given birth to a black child." The Prophet ﷺ asked him: "Do you have any camels?" He said: "Yes." The Prophet ﷺ asked: "What are their colors?" He said: "Red." The Prophet ﷺ asked: "Is there among them any that is white with a tinge of black?" He said: "Yes." The Prophet ﷺ asked: "What do you think, where did that come from?" He said: "Some lineage must have drawn it out." The Prophet ﷺ said: "Perhaps this (child) has also been drawn out by some distant lineage." (Meaning, due to resemblance with a distant relative, the child's color has become black.)
Hadith Referenceمسند الإمام الشافعي / كتاب عشرة النساء والإيلاء والخلع / 1204
Hadith Takhrijاخرجه البخاری ،الطلاق، باب اذا عرض نفى الولد (5305) - مسلم ، اللعان (1500)۔