For example, the white-tail damselfish primarily attacks intruders that compete with it for food. Studies have shown that shape, color and behavior are characteristics fish use to recognize their own and other species. Shape is often indicative of the feeding behavior of a fish. Herbivores tend to have a deeper, flatter shape than carnivores, which are built for speed and tend to be more elongate and streamlined. Therefore, instead of being able to recognize every species that enters its territory, the damsel is able to predict, with a great degree of accuracy, the feeding habits of the intruding species by its shape.
Color can also elicit aggression.
Butterflyfish use color pattern to recognize members of their own species. Some fish not only cue in on shape and color but also on behavioral characteristics. The size of an intruder may also determine if it is attacked, avoided or ignored. It is probably not worth the damsel's effort to chase a fish that will consume only a meager amount of food. Except in the case of certain species of damsels and tangs, larger fish are usually avoided by smaller residents in an aquarium.