With regard to yellowish or brownish discharge before the menses, if it comes at the usual time of the period or a little before, and it is accompanied with menstrual pain or cramps and is immediately followed by menstrual bleeding, then it is part of the menses and you should refrain from praying and fasting at that time. This is like when a brownish discharge comes for one or two days, accompanied by menstrual cramps, then the bleeding starts on the third day; all of that is menses. This is the most correct scholarly opinion concerning this issue. It was stated by Shaykh Ibn Baaz (may Allah have mercy on him), but he stipulated that it should be immediately followed by the bleeding and he did not stipulate that there should be any cramps or pain. This was also the former view of Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him), but his later view was that the yellowish and brownish discharge (before the period) is not to be regarded as menses at all.
See the following questions for some quotations from the two shaykhs (may Allah have mercy on them): 131869, 50430, 37840, 171945. See also Thamaraat at-Tadween ‘an Ibn ‘Uthaymeen (p. 24), in which the shaykh (may Allah have mercy on him) said: What I have realized lately, an opinion with which I feel that my mind is at rest, is that the menses is the emission of blood only. As for the yellowish and brownish discharges, that is not menses even if they appear before the white discharge. And Allah knows best.
It also says: A woman gets a brownish discharge for seven days, which is followed by ordinary bleeding that continues for the rest of the month. Then she becomes pure for a while, that may last as long as three months. What is the ruling on this blood and this brownish discharge?
He replied: All of the bleeding is menses, but the brownish discharge is not regarded as anything at all.
End quote from Thamaraat at-Tadween, p. 24, 25
What is more likely to be correct is what we have mentioned about regarding yellowish or brownish discharge that comes before the period as part of the menses if it occurs at the usual time of the period and is immediately followed by menstrual bleeding, and is accompanied by menstrual cramps. What makes it more likely to be correct is the fact that yellow and brownish colours are among the colours of blood according to most of the fuqaha’. Menstruation is the shedding of the lining of the uterus, with its blood and secretions; the blood may appear in various colours. It may start out heavy and black or dark in most cases, then grow lighter until it becomes brownish or yellowish. Or it may happen the other way round: it may start out yellowish or brownish and then become blood. We shall see below in the hadeeth of ‘Aa’ishah (may Allah be pleased with her) an indication that the yellowish or brownish discharge before the tuhr (white discharge signalling the end of menses) is also part of the menses. In fact there is no differentiation between it appearing before the tuhr or its appearing at the usual time of the period before the blood appears, accompanied by other signs of menstruation such as pain and cramping.
If it is said that it need not necessarily follow on immediately, that is a strong opinion and was the view favoured by Shaykh Ibn Baaz (may Allah have mercy on him), so long as it is at the usual time of the period.
The opinion of the fuqaha’ – such as the Hanafis and Hanbalis – that the yellowish or brownish discharge at the time of the period is part of the menses includes – and Allah knows best – the case mentioned here, which is the appearance of yellowish and brownish discharge before the period.
The opinion of others – such as the Maalikis and Shaafa‘is – that the yellowish or brownish discharge is menses in all cases, or at times when it is possible, includes cases where it appears before the period, as is obvious.
For more information please see: Mawsoo‘ah Ahkaam at-Tahaarah by Shaykh Abu ‘Umar al-Dabyaan (may Allah preserve him), 6/281-299; al-Mawsoo‘ah al-Fiqhiyyah, 18/296; al-Mughni, 1/202; al-Majmoo‘, 2/422
Yellowish and brownish discharge that appears after the bleeding and before the tuhr is part of the menses, because of the report narrated by Maalik in al-Muwatta’ (130) from Umm ‘Alqamah, according to which she said: The women used to send to ‘Aa’ishah the Mother of the Believers small vessels in which there was a cloth on which there was yellowish discharge from menstrual bleeding, asking her about prayer (i.e., whether they could resume praying), and she would say to them: Do not be hasty, until you see the white discharge – referring to the tuhr which signals the end of the period.
Classed as saheeh by al-Albaani in Irwa’ al-Ghaleel, no. 198
Also narrated by al-Bukhaari in a mu‘allaq report (Kitaab al-Hayd, Baab Iqbaal al-Maheed wa Idbaaruhu)
The yellowish or brownish discharge that may appear after the tuhr do not count for anything, because of the words of Umm ‘Atiyyah (may Allah be pleased with her): We used to regard the yellowish or brownish discharge after the tuhr as not being of any significance.
Narrated by al-Bukhaari, 320; Abu Dawood, 307; an-Nasaa’i, 468; Ibn Maajah, 647
And Allah knows best.