Gastrointestinal cancers can cause changes in stool color due to internal bleeding or obstruction. For example, colorectal cancer often leads to blood in the stool, which may appear as bright red or dark black. Liver and pancreatic cancers can obstruct bile ducts, reducing bile's ability to color the stool and leading to pale or clay-colored stools.