I've experienced this during a flair before. The foamy, yellowish liquid with blood. Not pretty. It might partially just be from gas, mucus and liquid kinda bubbling up. For me it was just associated with my flair. There wasn't anything else going on, well, I was pretty dehydrated and my flair was really bad at that point. That's all I know.
~37 year old male
~Diagnosed with severe UC (pancolitis) Sep, 2017
~Currently on Pentasa (1g 4x/day), Wellbutrin (150mg 2x/day) and Klonopin (.5mg before bed - sleep like a baby)
~Have used prednisone and rowasa in the past
~Allergic to flagyl
~Was in remission since winter of 2017, mild flare began May 2018 - getting colonoscopy the end of June - GI may switch me to a biologic after colonoscopy