Nothing wrong at all. You say you haven't had a period for some time. All this time since the last one the lining of the womb from the last period shed and got kinda stuck on the way not escaping and being wshed out with fresh blood. This is exactly the same stuff as a fresh bleed period only by now there is no oxygen left and without oxygen blood gets darker and darker.
Think about a cut on the skin - bright red bleeding at 1st, then as it scabs over it gets darker and darker and the scabs will be shades of brown. Same with any blood stained fabric.. Pillow or shirts from nose bleeds t first are bright red stains, then as time passes it gets darker and darker the longer it is waiting to be washed.
The same process has happened to the old lining fro your last period.
Some of the pills especially the progesterone based ones encourage more cervical mucus to form than you normally have and this forms a plug of mucus in the cervix which can prevent or stall the sluiced menstrual lining from passing through until some extra activity you undertake shifts that plug of mucus and the menstrual remains finally make their way out with gravity.
It actually happens naturally as you get older approaching menopause anyway, but when you are on the pill or other hormone treatments that stop or delay periods then you will have the same effect.
Nothing is wrong with it other than it does by then look a bit gross and is a shock the 1st time it happens. Just let it escape in its own sweet time. It is a lot stickier and less fluid than when it was fresh so it can take many days for it all to cler out of the body, with some days worse than others. If there isany fresh bright red mixed in with it, then that is a new period which is washing the old stuff down the chute as it comes out.
Spotting is when you have red blood bleeds but very light spots rather than any gushing flood. This brown or dark chocolatey coloured stuff is from a previous period not a new one.
If you are getting spotting while on this pill, you my want to discuss a slightly stronger dose pill with your GP to see if that stops any spotting. it depends how much of a disruption it is to your quality of life.