Symbiotic algae are mostly brown, that is why corals with high amounts of algae will turn brown.
Most of the color corals have comes from the fluorescent proteins they produce to modulate wavelengths of the light that they are exposed to. For example, they produce proteins that absorb high energy light at and beyond blue spectra and fluoresce it at a lower energy wavelength. Most common fluorescence wavelength is green because symbiotic algae (like land plants) cannot use green light for photosynthesis. So this allows corals to control how much photosynthesis symbiotic algae can do.