The yellow color of urine is due to the breakdown of red blood cells and the role of gut bacteria in processing bilirubin into urobilinogen.