Blue Stains on Clam and Sand

Blue Stains on Clam and Sand

Observation - Blue Stains on Clam and Sand - UK and Ireland. Description: Partially buried clam with inky-blue stains (photos 1-4). Several more nearby. Lots of inky-blue stains observed on the sand when the tide receded (photo 5) Suspect this is a defensive mechanism?

Partially buried clam with inky-blue stains (photos 1-4). Several more nearby.
Lots of inky-blue stains observed on the sand when the tide receded (photo 5)
Suspect this is a defensive mechanism?