From the Super Mario Wiki
Retrieved from "https://www.mariowiki.com/index.php?title=Rainbow_Ball&oldid=2181992"
The Rainbow Ball is Yoshi's Star Pitch in Mario Super Sluggers. After executing it, Yoshi will create a rainbow path for the baseball, which will be invisible until it reaches the end of the rainbow. During that time, the batter has to pay attention to when the baseball will reappear. If the batter isn't careful, they may end up getting a strike.
This Star Pitch is exclusive to Yoshi only; the other Yoshis do not have access to this Star Pitch.