The main components of urine are (salt) water and waste products. The major waste product from cells in the body is ammonia, and 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. So, if you drink a lot, your urine will be more dilute and clearer, and if you get dehydrated, your urine will contain less water and be darker yellow.