Your kidneys & liver are where the magic happens. Pee is made up of water and dissolved waste material from what you have been drinking and eating. It also includes material the body wants to eliminate, like dead blood cells and other things.
Urochrome is a yellow pigment that comes from the processing of dead blood cells in the liver. The liver protects your body from harmful substances by screening out the stuff in your blood that flows directly from your stomach and intestines.
Urobilin are the breakdown products of the bile pigment bilirubin, which itself is the breakdown product of the heme part of the hemeglobin from old blood cells. Most bilirubin is partly broken down in the liver before making its way through your intestines and out in your poop. Some remains in your bloodstream and is extracted by the kidneys.
The kidneys act as a filter for your blood, allowing water, sugars, vitamins, amino acids and other vital substances back into the bloodstream... all while eliminating excess water, salts and minerals, as well as urea from protein digestion, uric acid, creatinine from muscle breakdown, hormone waste and toxins. The remaining bilirubin is extracted by the kidneys, where converted it gives urine that familiar yellow color.
Urochrome and the degradation products of bilirubin and urobilin, make our pee yellow.
Some early Alchemists believed that the yellow-gold color of pee might be from actual gold and employed all sorts of experiments with it trying to derive gold from pee. As you might have guessed, there wasn't "Gold in them thar hills!" But, one German merchant and amateur-alchemist, Henning Brand did find phosphorus while performing an experiment with pee hoping for gold... Phosphorus is commonly used in safety matches and pyrotechnics.
More Pee Related Info