Not sure about the anti-fungal aspect, but red and yellow onions contain much more quercetin, a powerful anti-inflammatory and anti-viral, than white onions.
I found I had some stomach issues after eating raw red onion as part of a salad, but not every time. Onions have a lot of health benefits, so I’d like to eat more of them. I tend to be fine with cooked yellow onions. Does anyone know why they commonly cause stomach problems? My stomach is in crappy shape, so it’s no surprise for me to have problems after eating anything.