The color change (mechanism) (that we are discussing) is similar to that of the leaves (color change mechanism) of most deciduous plants. (The orange and yellow (pigments) already present (in the leaves) are overshadowed by the greens that have more chlorophyll. When the chlorophyll breaks down in the fall, the other colors are revealed.
Similarly, many different (pigmented) colors are present in the carapace of many lobsters, crabs and shrimp. Pink or red is the color of astaxanthin. But the molecules of astaxanthin are wrapped in chains of protein molecules that are the color of God. That's why (their) carapace takes on a dark color. When you steam the protein, (the protein) is unfolded and denatured. For these crustaceans, (the denaturation of the protein) releases a red pigment that changes the color of the carapace.