I had the same thing. You have a sinus infection and that is the green. I had the same thing and every morning I had congestion and dried on my throat and also I would blow and it would be green. If you have brown congestion that could only be dried blood, have you blown really hard??? You need a cortizone nasal spray and also antibiotics for 7-10 days. Augmentin is the best but there is also Amoxicillin, Bactrum, etc.... If you wait to late it can turn into bronchitis or ear infection and ear infections are very painful if you have ever had one. If that infection does not clear up after antibiotics then you need a CT scan like I had. You have have a polyps or you may need your sinuses opened to be drained. It is probably just an infection so go ahead and get it checked out because it won't go away. You can also buy some nasal rince irrigation over the counter for $15 and it works sooooo well. It clears all that junk out but it goes in one nose and out the other. It can be kind of uncomfortable to use but I love it, afterwards you can breath the best you had in years. I still use it a few times a week to prevent infection and it is a good product to try.
You probably have or had sinusitis. The infected mucus drains into the throat from your sinuses and makes you cough. Dark green and brown phlegm usually indicates infection, light green means it's getting better.