Body coloration protects the internal organs of a fish from the sunlight.
Fishes are able to recognize each other based on color and color patterns.
Just like as people we learn to recognize each other based on hair, face, and body structure. Camouflage is a term used to describe how body color and color patterns allow animals to blend in with their habitat. For example, the gulf flounder shuffles sand over its body to blend in with the ocean floor. When it moves to find another location its disguise is temporarily unmasked. Another example of a fish that uses camouflage to blend in with its surroundings is the stonefish, a type of scorpionfish.