A natural-colored lobster fed a diet of squid will turn blue. If lobsters do not get carotenoids from their diet, they can not bind the pigment because only plants can manufacture carotenoids. The protein to which astaxanthin binds in natural-colored lobsters is blue in lobster shells and green in lobster eggs. When the astaxanthin is not in the diet, would-be natural colored lobsters appear blue because the blue pigment in the protein expresses itself. Because the carotenoid is allowed to express itself.
Heat breaks up protein bonds.
When you cook a lobster the bond between the protein and the carotenoid breaks down and the red color becomes visible.