Painting a structure a lighter color at walls that face the rising & setting sun in the summer, and using a darker color at walls that face the rising & setting sun in the winter, will help to protect from and will help in taking advantage of the free and natural solar heat radiation.
Roofs should be a lighter color in warmer climates in order to increase its albedo or the amount of the sun’s heat radiation being reflected. This will cut down on the amount of heat being transferred through the roof structure to the living or occupied space and reduce interior air conditioning energy costs.
If is is an existing darker roof, it might cost less and be easier to install more insulation above the ceiling, and properly ventilate the attic to allow the heat to escape. Or you could use a proper white coating over your existing roofing material. It is critical to confirm compatibility of the coating and application technique with the existing roofing material. Many cities encourage cool or white roofs. However, you might have neighborhood restrictions that would prohibit changing the color of your roof.
Another important thing to consider is shade as a very affective solution to keeping a building’s exterior temperatures to a minimum.