The sun emits all the colours of the rainbow that, when combined, create what scientists refer to as a "white light."
We see the sun as a giant yellow ball because the Earth's atmosphere scatters light, cancelling out shorter wavelengths like blue and violet. Yellow makes it through because it is the brightest.
To better demonstrate the sun's wide spectrum, NASA has released a collage that depicts it on different wavelengths.
The space agency uses specialized instruments to pick up light waves undetectable by standard cameras.