Do you still have your gall bladder? Gall stones can cause the green color.
Write a food diary. If you had lots of greens around two to three days before the color comes out, it just means that you ate more green veggies than your gut could digest.
If that is not the case, please get your liver enzymes tested. The typical color of stool is called bilirubin, which is brown, and is made enzymatically from the red color of meat (hemoglobin). But if your liver has a problem, and the enzyme to convert hemoglobin to bilirubin is missing or impaired, another color can come out, biliverdin, which is green.
Good luck!