it's bile. nothing to worry about. the digestive systems produces bile all the time. it is usually mixed with the food, so you don't see it in particular, but sometimes when there's not much food, you can see just the bile. that's why it's important ileostomates drink lots, cuz we lose lots of fluids. the foam is probably cuz it's gasy.