Normally the semen is somewhat viscous, opalescent and whitish gray in color. However, depending on many factors including frequency of ejaculation, diet, general health, etc., the volume, consistency and color of the semen can vary. However, the presence of dead sperm or other infertility factors are rarely discernable from the gross appearance of the semen. Thickened yellow or lumpy semen usually occurs if one ejaculates infrequently and is due to concentration of that portion formed in the seminal vesicles. Brown or dark brown semen is usually caused by old blood in the semen or "Hematospermia" (or blood in the semen). This can be caused by several different things. It can be caused by things like Prostatitis (inflammation of the prostate gland), urinary tract infection, epididymitis, ejuaculation duct obstructions, cysts, STD's, urethritis (inflammation of the urethra-the passageway for urine to exit the body), and medications that cause thinning of the blood (like Heparin, Lovenox, and even long term use of Aspirin). Also, a long abstinence from sex or trauma to the penis or scrotum can also cause this problem, and from having procedures like vasectomy.
Pain or continued blood in the semen usually warrants a trip to the Dr. He/She will most likely rule out anything kidney or urinary tract related first, and then will most likely rule out STD's and then give you a good physical exam. Some men will have blood in their semen for no apparent reason and it will not cause pain and go away on it's own.
The treatment will depend upon the cause and this will usually be determined by urinalysis and culture and possibly x-rays. If there is an infection, antibiotics are used. The exact cause must be determined before the proper treatment can begin.
If my answer has provided you with some good insight today, please click "Accept" and I will received proper credit for my time and effort, otherwise, JustAnswer.com will hold your deposit. Before leaving feedback, please let me know if you need clarification or more info.