Multicolored or unusually colored stool is almost always caused by something you ate. Food dyes, brightly colored fruits, leafy greens, and certain medications can all tint your poop in surprising ways. If you recently ate rainbow candy, frosted cupcakes, colorful cereal, or a mix of vibrantly pigmented foods, that’s the most likely explanation.
Your stool gets its normal brown color from a pigment called stercobilin, which forms when bacteria in your gut break down bile (a digestive fluid your liver produces). When you eat something with strong enough pigments, natural or artificial, those colors can override or mix with that baseline brown and produce stool that looks green, red, blue, purple, or even black.
Food Dyes Are the Most Common Cause
Artificial food coloring keeps tinting whatever it touches long after you swallow it. Bright frosting on a cupcake, colored candy, flavored drinks, and dyed cereals can all change stool color dramatically. If you eat handfuls of rainbow-colored candy, the dyes can even mix together and turn your poop black.
This is especially common in children. Red Jell-O, grape Kool-Aid, red licorice, Fire Cheetos, green fruit snacks, and red frosting are frequent culprits. Grape-flavored Pedialyte turns stool bright green. Seattle Children’s Hospital notes that stool color in kids “relates more to what is eaten than to any disease,” and unusual colors are almost always traced back to food coloring or additives.
Natural Foods That Change Stool Color
You don’t need artificial dyes to get colorful results. Many whole foods contain pigments strong enough to show up in your stool:
- Red or pink: Beets, cranberries, tomato soup or juice, red peppers, rhubarb
- Blue or purple: Blueberries, grapes, plums. Blueberries contain a compound called anthocyanin that can tint stool blue, dark purple, or even greenish. Eating a large amount can make it look almost black.
- Green: Spinach, kale, and other leafy greens. Any food with high chlorophyll content can shift stool toward green.
- Orange: Carrots, sweet potatoes, and foods high in beta-carotene
If you ate a varied, colorful meal, different pigments digesting at different rates can create a streaked or multicolored appearance in a single bowel movement. That’s the “rainbow” effect, and it’s harmless.
Medications That Alter Stool Color
Several common over-the-counter and prescription medications change stool color as a side effect. Iron supplements can turn stool green or black. Bismuth subsalicylate (the active ingredient in Pepto-Bismol and Kaopectate) turns it black. Antacids containing aluminum hydroxide, barium used in medical imaging, and some antidiarrheal drugs can make stool pale, white, or clay-colored.
These changes are expected and not dangerous on their own. If you recently started a new medication and notice a color shift, check the label or packaging for stool changes listed as a known side effect.
What Green Stool Means
Green is probably the most common “unusual” stool color, and it’s rarely a problem. Your bile starts out green and gradually turns brown as bacteria process it during digestion. If food moves through your gut faster than usual, from mild diarrhea, a high-fiber meal, or just a faster transit day, bile doesn’t fully convert and your stool stays green. Iron supplements do the same thing through a different mechanism. Eating a large salad or a lot of green vegetables can also produce noticeably green stool on its own.
When Color Signals a Health Problem
Most color changes resolve within a day or two once the food or medication clears your system. A few colors, though, deserve attention if they show up without an obvious dietary explanation.
Red Without a Food Source
Red stool that can’t be explained by beets, red dye, or tomato products could indicate bleeding in the lower digestive tract. The key difference: beet-related redness is uniform and typically accompanies red-tinged urine, while blood from the GI tract often appears as streaks, clots, or a darker maroon mixed into the stool. One case study in The American Journal of Medicine described a patient hospitalized for suspected GI bleeding whose red stool turned out to be caused entirely by a beet supplement. Doctors confirmed it by checking that a rectal exam showed brown, blood-negative stool. If you’re unsure, and especially if the red color persists for more than two bowel movements without a dietary cause, it’s worth getting checked.
Black and Tarry
Black stool from iron supplements or Pepto-Bismol is expected. Black stool that’s also tarry, sticky, and unusually foul-smelling can indicate bleeding higher up in the digestive tract, such as the stomach or upper intestine. The blood darkens as it’s digested. This is distinct from the firm, dark stool you get from supplements.
Pale, White, or Clay-Colored
This is the color change most likely to reflect something medical. Pale or clay-colored stool means your poop isn’t getting enough bile, which is what gives it the brown pigment in the first place. The most common cause is a problem in the biliary system: your liver, gallbladder, or bile ducts. Gallstones blocking a bile duct, hepatitis, cirrhosis, fatty liver disease, bile duct narrowing, and pancreatitis can all reduce bile flow enough to lighten stool color. If your stool is consistently pale over several days, that’s a signal worth investigating promptly.
Yellow, Greasy, and Foul-Smelling
Occasional yellow stool is usually nothing. But if it’s persistently pale yellow, oily, bulky, and floats or is hard to flush, you may be passing undigested fat, a condition called steatorrhea. This happens when your body can’t properly break down or absorb dietary fat. Celiac disease, Crohn’s disease, chronic pancreatitis, cystic fibrosis, and small intestinal bacterial overgrowth are among the conditions that cause it. The stool often has a distinctly greasy sheen and a stronger-than-usual smell.
How Long Unusual Colors Last
Food-related color changes typically clear up within one to three bowel movements once you stop eating the triggering food. Medication-related changes persist as long as you’re taking the medication. If an unusual color lasts more than a few days with no dietary or medication explanation, or if it comes with other symptoms like abdominal pain, unexplained weight loss, persistent diarrhea, or fatigue, that’s when the color becomes diagnostically useful rather than just surprising.
For the vast majority of people Googling “rainbow poop,” the answer is almost certainly that colorful meal, that bag of candy, or that brightly dyed drink you had yesterday. Your digestive system is doing exactly what it’s supposed to do. It’s just showing its work.

