
Bubbles are the cheapest entertainment of the summer, right up until a shirt comes out of the wash with grayish spots that weren't there when it went in. The kids looked clean when they came inside. The stain showed up later, in the machine, out of nowhere.
That surprise has a name, and once you know what causes it the whole thing is easy to sidestep.
The marks that ruin clothing usually aren't soap. They come from a conditioning ingredient called polyquaternium-7 (who cares, I know), which shows up in a lot of commercial bubble mixes and in personal-care products like shampoo and body wash. It's a positively charged polymer, and dirt and loose dye in your wash water carry a negative charge. So the polymer sits invisibly on the fabric until wash day, then pulls every bit of grime toward it. The result is a dark spot that's close to permanent.
That's the bad version. Colored bubble liquid is the obvious other offender, since the dye goes straight onto whatever it touches.

Here's the part that should make you feel better: a bubble solution you mix yourself from clear dish soap and water has none of that polymer in it. The scary stain comes from store-bought mixes and from anyone who improvises with shampoo or baby wash. Make your own with the right soap and you've designed the problem out (at least until your neighbor is the one blowing bubbles)
Skip colored bubbles entirely, and never reach for shampoo, conditioner, or body wash as a base. If solution lands on fabric, rinse it by hand with cool water right away. And don't put a bubble-splashed item in the dryer until you're sure it's clean, because heat sets a stain you might still be able to save.
Both start from the same idea. Clear, dye-free, fragrance-free dish liquid instead of the green scented stuff, and you get bubbles without the laundry risk. Sano Spark makes a clear no-dye, no-fragrance dish liquid that's easy to find in your local grocery.
The giant-bubble batch
This is the one for big, slow, wobbling bubbles the kids chase across the yard. The cornstarch thickens the water so they hold together and last, and the baking powder helps them perform.
Stir the cornstarch into the water first until it's dissolved as much as it will go. Warm water helps. Mix in the baking powder, then add the soap last and stir slowly so you don't whip up a mountain of foam. Let it rest for an hour, ideally a few.

The simple everyday batch
Less to measure, less to clean up, and the lowest residue of the two. The bubbles run a touch smaller, which no one chasing them tends to notice.
Combine everything gently so it doesn't foam up, then leave it in the fridge for a few hours, overnight if you can. The rest is what makes it work, so don't skip it. Bring it out and use it outside or somewhere washable.
There are two situations here, and they are not equally fixable, so it helps to know which one you are dealing with.
The easier one is a fresh spill, before the item has gone through the wash. Rinse the garment right away with cool water, working from the back of the fabric so you push the bubble solution out instead of driving it deeper in. Then wash it according to the care label. Air dry and check it before it goes anywhere near the dryer, because heat can turn a borderline stain into a permanent one. Caught early, most bubble residue never gets the chance to settle in.
The harder one is the gray or brown spot that appears after washing. That is usually the polyquat-type stain, and it has a reputation for a reason. Be realistic, because some of these stains do not come out. Start by not drying the item. Soak it in an oxygen-based stain remover that is safe for the fabric, like Vanish or OxiClean, then rewash, air dry, and check. If it is fading, repeat the soak and wash.
For white cotton only, chlorine bleach is a last resort. Use it only if the care label allows it, and keep it far away from wool, silk, spandex, anything stretchy, and anything colored. Never mix bleach with another cleaner, ammonia, or vinegar.
If two rounds of oxygen bleach haven't moved it, that's usually your answer. Move the piece to the play-clothes pile rather than washing it thin chasing a stain that's decided to stay. Which is the whole case for mixing your own with clear soap and keeping the nice clothes inside.