It's important to remember that the Earth itself is not yellow. We see the Earth as a blue and green sphere because of its oceans and landmasses. The sun, however, appears yellow due to the way its light interacts with the Earth's atmosphere.
Let me know if you have any other questions!