The grey-ish, blue/black colour of decapods is produced by a complex of the reddish carotinoid pigment astaxanthin (which colours carrots and other reddish foods) and the blue-green protein a(lpha)-crustacyanin. Astaxanthin is heat-stable while a(lpha)-crustacyanin is not. When the animal is cooked, the crustacyanin is denatured which releases the astaxanthin and results in the bright red colour we see. With many thanks to Lisa Fagg for this information.