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.
First of all, you should know that if the yellowish or brownish discharge of a woman is connected to her menses (i.e. right before it or after it or during it), then it is considered as menses.
So if you do not see purity throughout that entire period, then in principle that yellowish or brownish discharge is considered menses. However, the least period of purity between two menses is thirteen days, as per the view which we adopt here at Islamweb. Therefore, if you see purity for a period of twelve days onl,y as you mentioned, then this bleeding that you have again cannot be menses. In this case, you are considered as having Istihaadhah (bleeding outside your monthly menses).
Hence, if you used to have regular previous menses, then you calculate the number of days of your menses based on it, and whatever days exceed this period are considered as Istihaadhah.
In case you did not have a regular and definite number of days for your menses previously, then you should consider the red bleeding that you see first as menses, and the when it stops, you should perform Ghusl (ritual bath) and pray and not care about the yellowish or brownish discharge that you see afterwards and not consider it as menses; rather, this is considered to be Istihaadhah. During Istihaadhah, you have to perform ablution for each prayer after its time starts and pray whatever obligatory or supererogatory prayers you wish to pray with this ablution until the time of the next obligatory prayer starts until these discharges stop.
This is the summary of our view, and there is no difference between the light or dark yellowish or brownish discharge.
If the period of purity between two menses lasts 13 days, then the discharges are considered menses; otherwise, it is Istihaadhah, as we clarified.
Allah knows best.