Shocking has a nice double meaning here.  It refers to the vivid brightness of the crab's color, but it also carries an echo of the word's meaning of "surprising" or "disturbing."  The author is perhaps surprised by the dead crab's color, and disturbed by it.  How could something so vivid be dead?  By recording both the brightness of the crab and his surprise at its death, the author again gives us a sense of the strength and vulnerability of the crab.