See, first of all our eyes are not a good device to determine the main color of a group of photons. the main color that we see is actually the intensity of a specific range of frequency in the light wave. it means there are all kind of photons coming out of the sun, but the amount of "Yellow" photons are much much more. that's because we see the sun "Yellow".
the Reason that I've put yellow in double quotation is because that the term Yellow is not very scientific. our eyes are not a perfect tool to determine the "main color" or the highest intensity of photons. it's not even good. it has lots and lots of errors. for example if you stay long in the sun shine and come back to darker place inside, you see everything Greenish.
now that's how you see the sun. 970
but the color of objects are totally difference. it's like this, different atoms has different electron orbitals. when the photons of sun shoot through the sky to the object, the object atoms get the photons that has "Perfect" energy to go on higher level of energy orbitals. by perfect I mean exactly the amount that is needed, not any more, not any less. and the come back to the same place, and by coming back they "reproduce" (it's is not good to use this word, it's only for better understanding) the photons and shoot it away. and then you see photons that is shot from the object.
so the sun shoots all kind of photons, but mostly yellow frequency, and objects shoot back the photons that are suitable for their orbital transition. if you put a Blue object under the sun, it only gets the "blue" frequency photons and it doesn't care if the yellow intensity is much more, the amount of energy in the yellow photons are not perfect for our object. So if you color all the city blue, you would ask: why every thing is blue, while the sun is yellow. but in reality it doesn't have anything to do with the intensity of your light source.
Hope that helped you. 970