All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
ImamAl-Bukhari reported that Umm Atiyyah said: “After we became pure, we did not consider the yellowish or muddy discharge to be anything”. This is also reported by Abu Daawood.
Imam Al-Bukhari also narrated the same narration but without the words “… after we became pure …”. Moreover, he entitled a chapter for this Hadeeth in his book as follows: “Having yellowish or muddy discharges other than during the period of menses”.
The practice mentioned in the above Hadeeth was during the time of the Prophet which means that he approved of it.
Moreover, the above Hadeeth clearly indicates that the yellowish and muddy discharges during the days of menstruation are considered part of menses, whereas during other days, it is not regarded as such. This is the opinion of the majority of the Muslim scholars .
Therefore, if a woman has a yellowish or brownish discharge just before the start of menses or during the menses itself and she also feels the signs of menstruation, such as the pain, and right after such discharge she menstruates, then the yellowish and muddy discharges are considered as menses. But if a woman has such discharges during the time of purity, then it nullifies ablution only but it is not considered menses, so she should not abandon the prayer, fasting or other religious obligations.
Finally, the purity is confirmed when a woman sees that her napkin is clean and her vagina is dry.
Allah knows best.