Sunlight is essentially all colours mixed together, which appears to our eyes as white. But this is only easy to see in pictures taken from space. The sun appears yellow due to our atmosphere. But once you leave the Earth's atmosphere, the Sun appears white rather than any single colour.