Published research on molluscan pigments seems to be pretty scanty.  I'm not
sure, but I suspect that part of the reason may be the difficulty in
procuring funding for "basic research".  The powers that be seem more
inclined to pour the bulk of available funds into "applied research", in
hopes of  producing an immediately marketable, or at least utilitarian
(medically, environmentally, industrially, etc.) result, rather than simply
interesting new information.  I'm speaking from the viewpoint of medical
research, which is my field, but I suspect the same is true in other areas
as well.  Of course, there would be no applied research possible if the
groundwork had not been laid by many previous contributors in basic
research.
OK, off my soapbox . . . Molluscan pigments are really quite a complex
subject.  We know that at least four distinct families of pigments are found
in molluscan shells and soft parts . . .
- porphyrins (usually greenish)
- indigoids (reds and blues)
- carotenoids (yellows)
- melanins (brown to black)
Whether indigoids are involved in the bluish coloration seen in some
specimens, I don't know.  Certain species, like Cypraea cylindrica and
Cypraea hirundo, are almost always bluish.  Other species, like those Ross
mentioned, are only occasionally bluish.  This may well be due to diet, as
we do know that many shell pigments are not produced by the molluscs
themselves, but are extracted from the food they eat, then incorporated into
the tissues, and via the mantle, into newly secreted shell.  Sometimes an
abrupt change in color pattern can be seen in a shell, and this is usually
the result of a change in food supply.  This is particularly common in land
snails.  It is by incorporation of food pigments that some nudibranchs are
able to precisely match the color of the sponge or gorgonian on which they
live and feed.  Other shell pigments may not be the actual pigments of the
food, but metabolic products of the food pigments.  In other words, the
mollusc digests the colored compound, breaking it down into other colored
compounds.  Still other pigments are mediated by genetic factors, are
actually synthesized in the body of the animal.  Even in these cases though,
the diet of the animal has to supply the basic components needed to build
the pigment molecule.
Some gastropods, especially small ones with a thin integument, may appear
colored due to the oxygen-transporting pigments of their hemolymph ("blood"
of sorts).  Many of them have hemocyanin, a copper-based compound which
appears bluish, or related compounds which look greenish.  But a few
molluscs have iron-based hemoglobin, as we do, and may appear pinkish.  Here
I am speaking primarily of soft parts rather than shell, but if the shell is
thin and translucent, the blood color may show through.
Finally, many colors seen in molluscan shells are not due to pigments at
all.  We have all seen the colors on the inside of an abalone or a pearl
oyster - colors which are not actually "there", in the sense of
pigmentation.  Such colors are produced by the differential refraction of
light in the various layers of the shell.

Paul M.