Can I Pray If I Have Brown Discharge Before My Period?
Question

At the beginning of my monthly period I usually get a yellowish brown discharge that lasts for between one and three days, after which the bleeding starts. Are these days during which this brownish discharge comes regarded as part of the menses or not? At the end of the period, after the bleeding, stops I get some brown or black discharge; is this regarded as part of the menses too, or not?.
Praise be to Allah.Can you pray if you have brown discharges before menses?
With regard to the 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 Baz (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 `Uthaymin (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 Thamarat At-Tadwin `An Ibn `Uthaymin (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.” (Thamarat At-Tadwin, p. 24, 25) 
What is more likely to be correct is what we have mentioned regarding the 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 jurists. 
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 Hadith of `Aishah (may Allah be pleased with her) an indication that the yellowish or brownish discharge before the white discharge signalling the end of menses is also part of the menses.
In fact there is no differentiation between it appearing before purity 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 to follow on immediately, that is a strong opinion and was the view favoured by Shaykh Ibn Baz (may Allah have mercy on him), so long as it is at the usual time of the period. 
The opinion of the jurists – 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 the yellowish and brownish discharge before the period. 
The opinion of others – such as the Malikis and Shafi`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: Mawsu`at Ahkam At-Taharah by Shaykh Abu `Umar Ad-Dabyan (may Allah preserve him), 6/281-299; Al-Mawsu`ah Al-Fiqhiyyah, 18/296; Al-Mughni, 1/202; Al-Majmu`, 2/422)
Ruling on yellowish and brownish discharges that appear after the bleeding and before the purity
Yellowish and brownish discharges that appears after the bleeding and before purity is part of the menses, because of the report narrated by Malik in Al-Muwatta’ (130) from Umm `Alqamah, according to which she said: The women used to send to `Aishah 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 purity which signals the end of the period. (Classed as authentic by Al-Albani in Irwa’ Al-Ghalil, no. 198) Also narrated by Al-Bukhari in a mu`allaq report: Kitab Al-Hayd, Bab Iqbal Al-Mahid wa Idbaruhu) 
Ruling on yellowish or brownish discharges that may appear after purity
The yellowish or brownish discharge that may appear after purity 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 purity as not being of any significance. (Narrated by Al-Bukhari, 320; Abu Dawud, 307; An-Nasa’i, 468; Ibn Majah, 647) 
And Allah knows best.