In case a woman sees that, she must take a bath. Umm Sulaim said: I was bashful on account of that and said: Does it happen? Upon this the Messenger of Allah ﷺ said: Yes (it does happen), otherwise how can (a child) resemble her? Man's discharge (i. e. sperm) is thick and white and the discharge of woman is thin and yellow; so the resemblance comes from the one whose genes prevail or dominate. (Using translation from Muslim 311)
أَنَّهَا سَأَلَتْ رَسُولَ اللهِ ﷺ عَنِ الْمَرْأَةِ تَرَى فِي مَنَامِهَا مَا يَرَى الرَّجُلُ فِي مَنَامِهِ فَقَالَ رَسُولُ اللهِ ﷺ إِذَا رَأَتْ ذَلِكَ الْمَرْأَةُ فَلْتَغْتَسِلْ فَقَالَتْ أُمُّ سَلَمَةَ وَاسْتَحْيَيْتُ مِنْ ذَلِكَ قَالَتْ وَهَلْ يَكُونُ هَذَا؟ فَقَالَ رَسُولُ اللهِ ﷺ فَمِنْ أَيْنَ يَكُونُ الشَّبَهُ إِنَّ مَاءَ الرَّجُلِ غَلِيظٌ أَبْيَضُ وَمَاءُ الْمَرْأَةِ رَقِيقٌ أَصْفَرُ فَمِنْ أَيِّهِمَا عَلَا أَوْ سَبَقَ يَكُونُ مِنْهُ الشَّبَهُ لَفْظُ حَدِيثِ الْعَبَّاسِ