Our sun is more green than yellow, but the best description (other than a chart of the actual spectral emissions) is probably white, when seen from space. When seen through the atmosphere of our planet, of course, it can seem to be different colors, such as yellows and/or reds or oranges.
Rainbows are products of atmospheric refraction, where the white light gets spread into different colors in different directions by frequency.
A different star would have slightly different frequencies, and a different atmosphere would filter and refract slightly differently… but a rainbow effect would still be essentially the same, because it is how our eyes perceive the spectrum of light, and other stars would still contain more or less the full spectrum, if in somewhat different arrangements.
Here is an example of a lens flare (not a rainbow, but still) on Mars: https://twitter.com/NASAPersevere/status/1379536046338154498