Sea shells are formed by the process of bio-mineralization where living organisms produce inorganic solids. Sea shells are the protective layers of marine animals called molluscs and other sea animals.
The colour that a sea shell has is not just to make the shell look pretty. It often acts as a camouflage, hiding these small animals from the predators that hunt them. The different shell colouring and patterns is even a means by which different species communicate with each other. Impurities like metabolic waste products that are present when the shell is being formed, gives the shell a different colour. Even what these little animals eat affect the colour of their shells. The food that the mollusc eats causes the little animal to produce pigments in the mantle of the epithelium of the mollusc. If the pigment is secreted continuously it creates a spiral or radial band but if it is periodic the shell develops sports or flecks.
Shells that are red in colour usually have carotene or pterodines in them. Brown and black hues are found in shells that have melanin in them. Some shell fish can even change their colour to hide on the seabed when predators are near.