The Role of Color on the Reef
Rods and cones
The way that fish see the world is dramatically different from the way humans see it. This is largely due to the scattering of light that occurs in their underwater habitats. Scattering of light has a huge impact on both underwater visual systems and the colors used in marine signaling systems. The retina of the eye contains light detecting cells called rods and cones. Rods are responsible for detecting low-intensity light while cones pick up high-intensity light and colors. Fish that live closer to the surface, where there is more visible light, tend to have more cones than fish that love in deeper waters and rely more on rods. Those that live below the photic zone often have more rods than cones while those that live in deep-sea habitats often lack cones altogether. Fish that only have one or fewer types of cones are not able to detect different colors. They can only detect variations in light intensity and as a result see shades rather than colors. Fish that live closer to the surface and in more lighted waters, such as the coral reef environment, are capable of seeing a broad array of colors. Their retinas contain two or three different cone cells, giving them an acuity which exceeds that of human vision.
UV visual sensitivity
It is a common, but certainly not dominant, feature for coral reef fish to possess short wavelength vision.
This allows them to see a broader spectrum of light than other species. There are three categories used to describe this vision: ultraviolet (UV)-sensitive, UV-specialized, and violet-specialized.
UV-Sensitive: This type of fish vision is characterized by a lack of specialized UV receptors. In this case, the UV blockers simply fail to function below 400nm. These fish probably do not have true UV color vision and cannot discriminate between hues. 
UV-Specialized: These eyes allow transmission of UV light to the retina. They fail to block some of the light in the UV spectrum. This category of fish vision is characterized by the possession of receptor cells that are responsive to visual pigments absorbed at 360nm. These fish possess UV-sensitive cone cells with peak absorption between 300nm and 400nm. They may have true color vision and recognize UV as a color. 
UV-Sensitive Cone Cells: These cells allow for true color vision and hue discrimination. It is likely that they provide the fish with separate perceptual functions, such as prey detection.
Violet-Specialized: Fish with this type of vision are capable of blocking some radiation below 435nm. Their receptor cells are most sensitive to radiation that is between 400nm and 435nm. This allows for increased sensitivity to violet light in deeper water where UV radiation is less than violet radiation and there is a lower risk of ocular damage from harmful UV radiation. These fish display improved color constancy and focusing ability and are able to retain some of the advantages of UV-specialized vision (i.e. prey detection).
Specific colors and patterns
A wide array of colors and hues can be found in coral reef fish, including blues, reds, oranges, yellows, greens, grays, whites, blacks, browns, and silvers. Though there is an extremely wide variety of colors, it appears that the most dominant are yellows and blues. A possible explanation for this is that these colors blend well with the "average" reef background, providing protection through camouflage to otherwise defenseless reef fishes. Many of the fish that live in the shallower, clearer waters display vivid hues and interesting patterns, often composed of more than one color. Specific patterns, like bands, stripes, bars, speckles, spots, lines, blotches, eye markings, ocellated spots, or a combination of these, are beneficial in identifying specific species of fish as well as understanding what the purposes of these patterns may be. 
The Role of the Environment in Coloration
Not only does water control the light field at any location within the reef, but it also has a dramatic effect on how the colors and patterns of a target are perceived by the observer. For example, some fish and crustaceans that live in deeper waters appear red to the human eye when a light is shined on them. It seems, however, that this may not be how they are perceived by other fish. These bright red creatures more likely appear to be gray or black at depth and it is unclear why they have adapted such a bold pigment. Some fish, like the regal angelfish, are able to use the environment to their advantage. They have contrasting bars lining their bodies which blend together in a predators brain when they swim against a complex background. Fish tend to use distance and motion to their advantage when attempting to escape predation as these make it more difficult for the predator to detect fine details and distinguish contrasting lines.
Roles of Colors
As previously discussed, many fish use their colors and patterns as camouflage to avoid predation. A common type of camouflage where fish have a darker dorsal side and a lighter ventral side is known as countershading. The way that this technique works is that the fish blend into the darker, deeper waters when viewed by predators from above, while they blend into the lighter, shallower waters when looked at from below. Striped patterns allow fish to blend into their background when viewed from the side. Similarly, spotted patterns confuse the predator and make it difficult for them to hone in on the fish. Some fish display eye spots on their tails to confuse predators. Usually the eye is the most visible feature of a fish, so attacks are aimed at the head region, limiting the chances for escape. By confusing the predator into striking at the tail, fish are able to flee more easily. Silvery fish use their shiny scales as camouflage. These scales do not polarize reflected light, making the fish less visible to predators.  Camouflage is also used by some predators to sneak up on prey and limit their chances for escaping.
UV light is used as a communication tool in those species of fish that can see within the UV spectrum. Many species of damselfish have been found to display UV facial patterns to communicate what species they are without risking detection by predators who do not have the cones to see this shorter-wavelength light. Colors can also communicate warning, which, like camouflage, is a protection mechanism. In this case, the fish is easily detected by predators but specific colors, like bright red, communicate that they are harmful to the predator and should not be attacked. Other fish use specific colors and patterns to advertise their services to other fishes. Cleaner fish, like gobies and wrasses, typically exhibit a striped pattern with blues and yellows to make themselves easily distinguishable to fishes that need cleaning.
Color plays an important role in the mating process of many coral reef fishes. Some fish have chromatophores which are specialized cells capable of changing color. These cells are controlled by neurons and hormones. Two subdivisions of chromatophores are leucophores, which exhibit a pale hue when activated, and iridophores, which turn bright blue and other iridescent colors. Iridophores are also used for camouflage and defensive communication (for threatening predators), but the more common purpose of these cells is for sex. For example, the male flasher wrasses swim out into open water and "flash" iridescent blue stripes to attract their female counterparts. The females see this "irresistible" display and swim to the surface to explosively release their eggs while the males release sperm to fertilize the eggs. Both then quickly swim away to safety. The wrasses are in a vulnerable state already and therefore do not want to be seen by predators. It is important that the males can turn off this signal quickly because not only does it attract the females, but it also attracts predators.
Life cycle phases
Interestingly, many juvenile fishes share little resemblance to their adult counterparts. This seems somewhat counterintuitive because in most animal species the juveniles are smaller and less developed, but still look similar to the adults. So why are the juveniles of coral reef fishes differently colored and patterned? The answer: for survival. Fish that live in the reef tend to be highly territorial and competitive with their own species. They don't seem to take size into account when competing with fish displaying similar patterns to themselves. If juveniles were attacked by adults, the adults would surely win purely because of their size advantage. By exhibiting different colors and patterns, the juveniles are capable of peacefully coexisting with the adults, allowing for adaptation to the environment as they develop.
specific examples: Queen Angelfish, Schoolmaster, Dusky Damselfish
Polymorphism, in biology, is the exhibition of starkly different phenotypes or colors in the same species. While some biologists believe that one specification for this trait is that the phenotypes must be present in the same population, others argue that if the animals are still considered part of the same species, the difference in phenotypes can be described as polymorphic. In reef fish, determining polymorphism is a difficult task. For example, one species of cleaning gobies have a deep genetic divergence between three phenotypically separate varieties. However, some hamlet species were found to exhibit various indistinguishable color morphs. Different studies focusing of polymorphism often produce very different results. Some colors prove to be strongly related to polymorphism, such as light pinks and oranges in one Kimbe Bay experiment, have proven to be less related to polymorphism, while some colors, such as greys and brown in the Great Barrier Reef, have proven to be indicative of this expression. 
Zooxanthellae are the principal contributor to the vibrant colors seen in the coral reef ecosystem. These photosynthetic algae live in a symbiotic relationship with the coral. The zooxanthellae provide the coral with essential compounds such as proteins, fats, and carbohydrates. Zooxanthellae also aid in the coral's ability to synthesize calcium carbonate, which makes up the bulk of the coral's skeletal structure. Fluorescent Pigments are important in . These pigments in the zooxanthellae accept low wavelengths of light and then, through photosynthetic pathways, convert the light into longer wavelengths. Shorter wavelengths tend to induce vibrant coloration more than longer wavelengths; however, it can also damage the zooxanthellae through photoinhibition.
Lighting is one of the most defining factors in determining the color of corals. Intensity, concentration, and wavelength (color), all play a role in how coral expresses its color. The wavelength of light determines how effectively the zoxanthellae can use the light to photosynthesize and produce nutrients for the coral. It's important to have a baseline understanding of ultraviolet light, which is not detectable by the human eye, to fully understand the different types of light the zooxanthellae can utilize.
UV-A: 315-400 nm The upper region of wavelength spectrum can pass through normal silicate glass and exhibits few, if any harmful effects on living tissue.
UV-B: 280-315 nm This range of wavelength is responsible for most sunburns. It can not pass through silicate glass and is usually stopped in a few feet of water. However, in the crystal clear waters of reef areas, these rays can penetrate up to 30m deep.
UV-C: 100-280nm Light sources producing this wavelength range have been proven to be harmful to living tissues.
Some corals in shallow waters can produce mycosporine-like amino acids that act as a sort of sunscreen to protect them the light energy at shorter wavelengths. These proteins have been found to have some effect on the color of corals; however, this is still up for debate among many biologists and in deeper reefs the acids do not play a role in color.
Nutrition also plays an important role in how zooxanthellae and coral obtain their vibrant colors. Zooxanthellae have a compensation point at which the rate of photosynthesis equals the rate of cellular respiration. This is the bare minimum amount of return they can get on their photosynthetic processes in order to survive. The main factor in this equation is the amount of light available to the algae. This amount of light can be determined by depth, geographical location, or amount of nutrients in the water. On the opposite side of the spectrum, there is also a saturation point. At this point, an increase in light intensity does not positively affect the amount of metabolic product the zooxanthellae can produce. This saturation point is important because it allows more nutrients to be consumed by the host coral the zooxanthellae reside on. However, corals do not feed solely on the metabolic waste of the zooxanthellae; they also consume phytoplankton and zooplankton in the water. While there is a notable lack of phytoplankton and zooplankton in the majority of coral reef areas, their presence still plays an important role in how the coral maintain their zooxanthellae population. Corals balance the concentration of zooxanthellae on their surfaces based on their other dietary needs. An increase of phytoplankton and zooplankton yields less of a need to sustain the zooxanthellae. In an excess of these microscopic nutrients, corals will actually expel their zooxanthellae, rendering them less colorful, or even colorless (known as bleached.) While this isn’t currently the leader in cause of coral bleaching, it can be detrimental to the ecosystem in many various ways.
Coral bleaching is a detrimental condition that is caused by either the coral's expulsion of its intracellular symbiotic partner, zooxanthellae, or the loss of pigment in this algae. Corals release this algae from its surface when they are subjected to stressful conditions. While there are many factors that can cause the stress of corals, such as exposure to air, solar radiation, and fresh water dilution, the most common reason is rising sea temperatures. As this algae provides the coral with most of its color, once void of the zooxanthellae, the coral becomes a lighter, or even stark white, hence the term, "bleaching." While corals can live for short periods of time without their zooxanthellae partner, the majority of events that result in loss of zooxanthellae also result in death for the corals. Apart from these direct consequences that bleaching events have on the coral themselves, the white environment the bleaching creates can also render the area unsustainable for the otherwise vibrant fish. Fish use the colorful ecosystem to hide predators as well as stalk prey, so the rapid change in color alone can be devastating to a reef.
- Marshall, N. J., K. Jennings, W. N. McFarland, E. R. Loew, and G. S. Losey. "Visual biology of Hawaiian coral reef fishes. III. Environmental light and an integrated approach to the ecology of reef fish vision." Journal Information 2003, no. 3 (2003).
- Sumich, James L. and John F. Morrissey. Introduction to the Biology of Marine Life. Sudbury: Jones and Bartlett Publishers, 2004. Print.
- Losey, G. S., W. N. McFarland, E. R. Loew, J. P. Zamzow, P. A. Nelson, and N. J. Marshall. "Visual biology of Hawaiian coral reef fishes. I. Ocular transmission and visual pigments." Journal Information 2003, no. 3 (2003).
- Marshall, N. J., K. Jennings, W. N. McFarland, E. R. Loew, and G. S. Losey. "Visual biology of Hawaiian coral reef fishes. II. Colors of Hawaiian coral reef fish." Journal Information 2003, no. 3 (2003).
- Longley, W. H. "Studies upon the biological significance of animal coloration. I. The colors and color changes of West Indian reef‐fishes." Journal of Experimental Zoology 23, no. 3 (1917): 533-601.
- Messmer, Vanessa, Lynne van Herwerden, Philip L. Munday, and Geoffrey P. Jones. "Phylogeography of colour polymorphism in the coral reef fish Pseudochromis fuscus, from Papua New Guinea and the Great Barrier Reef." Coral Reefs 24, no. 3 (2005): 392-402.
- Alieva, Naila O., Karen A. Konzen, Steven F. Field, Ella A. Meleshkevitch, Marguerite E. Hunt, Victor Beltran-Ramirez, David J. Miller, Jörg Wiedenmann, Anya Salih, and Mikhail V. Matz. "Diversity and evolution of coral fluorescent proteins." PLoS one 3, no. 7 (2008): e2680.
- "Obtaining the Best Colours from Your Corals." Reefworks. N.p., n.d. Web. 16 Apr. 2014. <http://reefworks.co.uk/articles/obtaining-the-best-colours-from-your-corals/>.
- Buchheim, Jason. "Coral Reef Bleaching." Coral Reef Bleaching. N.p., 1 Jan. 1998. Web. 16 Apr. 2014. <http://www.marinebiology.org/coralbleaching.htm>.