The fish that live on coral reefs also get some of their food from the water column. They eat plankton, small fish, and invertebrates. However, some reef fish also eat corals. These fish are called "corallivores." Corallivores include parrotfish, butterflyfish, angelfish, and triggerfish.
The type of food that a coral reef fish eats can affect its color and shape. For example, fish that eat a lot of algae tend to be green or blue, while fish that eat a lot of plankton tend to be red or orange. Fish that eat a lot of coral tend to have sharp teeth and jaws that are adapted for breaking through the coral's hard skeleton.
The diet of a coral reef fish can also affect its behavior. For example, fish that eat a lot of plankton tend to be more active and swim in open water. Fish that eat a lot of coral tend to be more sedentary and stay close to the reef.
Overall, the diet of a coral reef fish is an important factor that can affect its color, shape, and behavior.