Some species of stomatopod change color across a molt to match ambient lighting conditions. This is most likely to happen in species that occupy a variety of habitats including those that live at different depths. Seawater transmits blue light the best so the deeper you go, what light is penetrating is around 475 nm (blue). By the time you get to 30 m, there is very little light except blue. A red stomatopod would look black (except for a few species that we have shown fluoresce red in blue light).
Species like Neogonodactylus wennerae live in a diversity of habitats over a considerable depth range. Near the surface in broad spectrum light with lots of green algae and sea grasses, they are typically green or mottled green, tan and brown. On white coral sand, they will have more while or tan. At depths around 10 m we see more red morphs although there are still dark green and brown morphs. As you go deeper to around 30 m, most animals are red or red and tan mottled. The transistion depends on the clarity of the water (among other things). Some, but not all N. wennerae change color across a molt when moved from broad spectrum surface light to dimmer blue at depth. Light intensity and color both seem to play a role. However, there seem to be other genetic factors involved that also control color and pattern.
N. wennerae seems to change color primarily with respect to the intensity and color of the ambient light. Other species such as Pseudosquilla ciliata seem more inclined to match background color.
Roy