Opaline gland
Sea hares are gastropods without hard shells, using their specialized ink as their main defensive mechanism instead. Their ink has several purposes, most of which have a chemical basis. For one, the ink serves to cloud the predator's vision as well as halt their senses temporarily. In addition, the chemicals in the ink mimic food. Their skin and digestive tract are toxic to predators as well. They are also seen to change their feeding behaviours in response to averse stimuli. Diet and impact on ink. The diet of sea hares enable them to gain the chemicals present  in their ink and determine the color of their ink. They have adapted over time to feed mainly on seaweed and algae as without their specific diet they will be left without ink and fall prey to predators. The species they feed on determine the strength of their chemical defense. Individuals that feed on red algae, such as plocamium, were found to have better defense than those that fed on green algae, like ulva lactuca. Chemical component. The ink and opaline glands produce ink and opaline respectively; these two substances are mixed in the cavity and expelled towards the predator . The ink and opaline are highly concentrated with free amino acids and ammonium; they are responsible for the response of the predators since predators have receptive sites for them. The ink and opaline has been demonstrated to stimulate appetitive and ingestive behaviours, though opaline differs in the sense in that it inhibits ingestion. The effect on predators. Phagomimicry. Phagomimicry is the defensive behaviour in which expelled chemicals mimic food, deceiving some organisms to eat it instead. In the case of sea hares, the ink produced deceives their predators to attack their ink instead of pursuing the sea hare. This is  possible because of the chemicals present in sea hares' ink mixture. The ink and opaline contains high levels of amino acids and ammonium, present in their predators' food. As a result, predators are deceived into attacking the mixture and feeding on it. This gives the sea hare an opportunity to escape. This reaction has been observed in some lobsters. Sensory disruption. The chemicals produced also affect the nervous system of the predators. The ink produces an averse response in some predators. For instance, sea anemones shrivel up when they come in contact with the Ink.