Shrimp, before its cook, is a exceedingly unappetizing gray-blue shade. This shade, it turns out, is the exoskeleton( you are familiar with, the shrimps external skeleton ).
Now, to explain how that exoskeleton alters pink we have to get technical on you. Here we go: the exoskeleton contains carotenoids( who the hell is tints) called astaxanthin. It is these carotenoids that are what give salmon its pink shade. Before the shrimp is cooked the astaxanthin is covered by protein chains called crustacyanin. The protein chains in fact wrap up the astaxanthin, burying its lovely pinkish-red color.
But heat loosens the view these protein chains have on the carotenoids and secretes the astaxanthin, transforming the shrimp its delightful color of pink. This is the same reason lobsters turn red when you cook them.
One more fun point: if youve ever heard that flamingos are pink since they are snack shrimp, its because of this same carotenoid. While flamingos snack shrimp that still show blueish grey-headed( they dont have the indulgence of cooking them before gobbling ), the crustacyanin protein chain dissolves in digestion liberating the carotenoid that represents flamingo plumages more pink.