Typically a mucousy stool is an indication of irritation to the lining of the intestinal tract. This could be due to worms, bacterial infection, a swallowed non food item, bone or greenie chips etc. But sometimes this can be due to ulcers, intestinal tumors, or even a food sensitivity. Dogs can develop sensitivities to foods they always eat but can also react to a change in food or food formula.
You can start by having your vet check a fresh stool sample for worm eggs or protozoan infections such as coccidia or giardia.
You might want to try a couple of bland meals and see if that helps.
I would suggest trying boiled chicken meat or hamburger with the fat drained off, mixed with really well cooked rice in a ratio of 1/3 meat to 2/3 rice to see if that works. It's not a balanced diet but OK to use for a few meals while working on controlling digestive upset.
But if he doesn't seem better and no worms or other infections are found I'd get him in for a full vet exam.
Hope this helps you!
Yes it can be pink if the irritated area is bleeding - think worms attached to intestinal walls, inflamed intestinal tract, a non food or sharp item scraping along etc.
Irritation can be enough to cause bleeding resulting in the colored mucous.
It is something worth getting checked out. The gas is also a sign of digestive upset in many cases.