Originally posted by the Bear:
the main components of urine are (salt) water and waste products...
the major waste product from cells in the body is ammonia
the major waste product from blood is a broken form of heme called bilirubin
in the liver, each of these is converted into a less hazardous form: ammonia is converted to urea, and bilirubin is degraded to urobilins
salt, water, and urea are all colorless, but urobilins (which come from degraded pigments) are yellow

correct
Bilirubin is conjugated in the liver and stored in the gallbladder, when excreted, it gets to the small intestine and most of it is recycled back by a pathway called the enterohepatic circulation to the gallbladder. A few of it gets into the large intestine and gets unconjugated by the bacteria. Some of it enters the bloodstream as urobilinogen (yellow pigment) and is excreted via the urine. When urine is left standing in the toilet bowl, urobilinogen will get oxidized to urobilin and become dark yellow to brown color...
The rest in the large intestine gets converted to stercobilin and excreted via feces, giving it the brownish - yellowish pigment