The color of shit and urine are both due to breakdown products of heme. The complex digestion process ensures that almost no useful energy goes unused. The average bowel movement is three parts water to one part solid matter. Bacteria make up 30 percent of the solid stuff. The same goes for indigestible foods like cellulose and extra fiber. The remaining 40 percent contain various inorganic wastes, fats and used-up body substances like red blood cells, which are released from the liver in an orange-brown compound called bilirubin.
When red blood cells reach the end of their useful life, the hemoglobin in them is broken down, including various inorganic wastes, fats and used-up body substances to form the shit.
Bilirubin, which is taken up by the liver, which conjugates it to glucuronic acid (to make it more water-soluble) and excretes it in bile (bile juice is in Yellow in colour), which goes to the gall bladder and then into the small intestine. Bacterial metabolism in the small intestine converts it into stercobilin, which is brown and responsible for the color of shit. Some of the bacterially metabolized bile pigments are reabsorbed into the blood, oxidized to yellow urobilin, and excreted in the urine.
Terms of Service: https://www.quora.com/about/tos