When alive, shrimp and crabs have a blue-black back, but after being boiled, their shells turn a bright orange-red color.
The cause comes from a chemical compound called Astaxanthin found in the shells of shrimp, crabs and some clams. Astaxanthin is an orange-red pigment, belonging to the Carotenoid chemical group, which is an antioxidant.

When shrimp and crab are alive, although Astaxanthin is present in their shells, it is covered by another compound called Crustacyanin, so it does not show its original bright red color. However, Crustacyanin is not heat-resistant. Under the effect of heat when cooking, Crustacyanin will decompose, causing Astaxanthin to be released and making the shells of shrimp and crabs turn orange-red.
By observing the intensity of the red color when the shell discoloration occurs, we know when the shrimp and crab are cooked or still "rare".
Another interesting fact about the animal world is that the pink-orange color of flamingos comes from their diet of algae, grubs, and brine shrimp. Flamingos’ diet contains large amounts of beta carotene, a red-orange pigment. When the flamingo’s stomach digests its food, it releases Astaxanthin, which the bird’s body absorbs and gives its feathers their pink color.
In the seafood industry, to make salmon meat a deeper orange color and clownfish skin a more vibrant red, salmon and clownfish farmers feed them food containing Astaxanthin.