Stool can also appear green for physical reasons, and not just from what you've been eating. We think of a healthy stool as being brown. Bile that is secreted in the first part of the small intestine is actually green. As stool is digested and passed through the large intestine it is turned into a darker brown color.
If stool is still green by the time it is excreted, it could mean that it went through the large intestine too fast to be changed in color. This is often called "rapid transit" or "decreased colonic transit time" and diarrhea that is green in color could be the result.
In breast-fed babies, green stool is a normal occurrence, especially right after delivery. In older children, the reason could be food-related as described above, or even from non-food items. Eating or sucking on colored non-food items such as crayons might also turn stools different colors.
If green stool continues, or your bowel habits have changed in other ways, you may want to call your doctor. This is especially true if you are experiencing diarrhea which can be an indication of other problems or could lead to dehydration.
different types of food dyes can affect the color of the stool./ When we eat beets, our stool is usually pink and I know from eating trix cereal, you can have green stools--as far as the stomach pain goes, I would have him checked out