Variation in traits causes some individuals better suited in an environment over other individuals. The traits that allow individuals to survive and reproduce are the ones that are maintained over time. The organisms with favorable traits tend to pass on these traits to the next generation by reproduction so they can adapt to the environment they live in; this process called natural selection. For instance, natural selection acted on mantis shrimp so they can defend themselves, reproduce, and forage.
Peacock mantis shrimps have evolved some behavioral strategies to defend themselves and their cavities against predators. They also have some morphological traits so they can feed on prey. Mantis shrimps, like other arthropods, have hard exoskeletons that help to protect them predators. Additionally, they have developed other adaptations to defend themselves.
They can attack their prey using their deadly appendages (aka raptorial appendages) that are also composed of a tough exoskeleton. Mantis shrimps are aggressive species and their punch is no joke. They can kill prey larger than their size to get their food source. In order to get their meal in a fast way underwater, they need high energy storage and release so they can respond and show their fast-striking mechanisms.

Having some attraction so you can find a mate for reproduction is one of the adaptations that peacock mantis shrimp evolved. They are some of the most attractive and brightly colored animals in the ocean.
They evolved vibrant multi-colored excoskeleton with a blue and green color base body. Their beautiful orange antennas and red appendages make them more vivid, which can help them in their mating behaviors. As many animals, male mantis shrimps are more colorful than females so they can attract them for mating and reproducing.

