Fish/Adapting to the environment
Template:Adapting to the environment footer
The most diverse adaptations to the shape and appearance of fish occur in fresh waters, where fish must cope with high or low water levels, fast or slow water flow, wide temperature ranges, and sparse or dense vegetation. Marine fishes adapt principally for species recognition, camouflage, and defense.
Body shape
The shape of a fish is the direct result of its environment. Fish that inhabit fast-flowing rivers, for example, are often more streamlined than the disk-shaped fish of shallow backwaters. Freshwater fishes may be flat-bottomed to hug the riverbed; thus avoiding being swept away by strong currents. Species with tall, thin (laterally compressed) bodies are often found living among plant stems in lakes, while fish with flat dorsal profiles swim just below the waters surface.
Self preservation
Fish have evolved defenses to deal with the dangers posed by predators. Sharp, erectile fins, for example, prevent the hunted from being pried from a safe crevice or swallowed, and some species excrete a poison when danger threatens. Some fish generate electricity (which is used by other species as a navigational aid) to stun their enemies.
Coloration
The dazzling colors of fish have very practical purposes: recognizing fellow species and camouflage in the face of danger are priorities, but some fish mimic the colors of other fish for predatory ends. Colors intensify at breeding times to warn off others, and patterns may also help young fish recognize their parents.