

Cones
In order for color to be perceived, it is necessary to have several varieties of photoreceptors, each responding to different wavelengths of light. These are the cones. The retinal molecule is identical in each type of cone, so it is the opsin protein that is responsible for the different wavelength sensitivity of each cone type.
The wavelength of light is related to the energy of its photons. Shorter-wavelength photons—those toward the blue end of the visible spectrum—carry more energy, while longer-wavelength photons—toward the red end—carry less.
For a photon to be absorbed by a cone cell, its energy must be sufficient to elevate an electron in retinal to a higher orbital. The surrounding opsin influences the amount of energy required, making retinal more likely to absorb some wavelengths than others. In this way, each type of cone is most sensitive to a different range of wavelengths.

More Detail
Opsins, like all proteins, are chains of amino acids, like a string of beads on a necklace. DNA contains the code that determines which of the 20 amino acids is placed at each position in the chain. However, a simple linear chain has little functional capability. Proteins gain their function by folding into complex shapes. The folding is determined by the shape and electrical charge of each amino acid and its neighbors. A common shape for segments of a protein is a helix, which is somewhat rigid and shaped like a cylinder or rod.
Opsins are proteins containing about 350 amino acids and are located in the photoreceptor cell membrane. Opsins have seven such cylindrical helices that span the membrane. Retinal is a small molecule attached to the amino acid lysine on helix number 7.
Only one end of retinal is attached to the opsin. The rest of the molecule is nestled in a “pocket” formed by nearby amino acids, where the bent retinal fits tightly among them.
The electrons in the pi bond at retinal's bending point are influenced by the electrical environment created by nearby amino acids. This affects the amount of photon energy needed to push an electron into a higher-energy orbital. If an arriving photon does not have the appropriate amount of energy, it is much less likely to be absorbed. This gives the photopigment a peak response to a particular range of wavelengths. In this way, the opsin protein tunes the wavelengths of light to which retinal is most sensitive. Differences in the opsins are therefore responsible for the different wavelength sensitivities of the three types of cones.
The straightening of retinal pushes against the surrounding amino acids, causing some of the opsin helices to move apart and changing the shape of the opsin. This opens a site where a signal molecule called a G protein can attach. The activated G protein starts a series of chemical reactions that breaks down cGMP. As the amount of cGMP falls, sodium channels in the cell membrane close. This makes the inside of the photoreceptor more negative, or hyperpolarized, changing the electrical signal that the photoreceptor sends to the next cells in the retina.