The sun is not actually yellow, it is white. Its light appears to us as yellow as it travels through the atmosphere of the Earth.