You don't have to replace the roof. You can coat it in a white, "elastomeric" paint like [1]. Each bucket can do about 450 sq ft (40 sq m) and is ~$100 for the supplies.
In California, roof color isn't regulated, but reflectivity (or rather energy absorption) is by Title 24. You're basically required on new construction to have a fairly efficient roof.
[1] https://www.homedepot.com/p/Henry-4-75-Gal-Acrylic-Reflectiv...