Are those aposematic colors? You had mentioned them being grown on farms as food, so I am surprised to see such bright colors. Though, I suppose the animal can retreat pretty quickly into a pretty impervious shell, eh?
It's not aposematic, blue looks black with much of any depth in the ocean. The majority of wild specimens are colored in tans and browns but are still quite pretty. Aquarium specimens are farmed for the better colors that are actually from the color of the algae in their tissues. It's not genetic, they can influence the colors by which color adult clam they grind up to give the veliger clams zooanthellae starts.