The function of the eye is to convert light waves to action potentials. In order to understand how this happens, we need to know a little about the nature of light. Visible light is a very small portion of the spectrum of electromagnetic radiation. The entire spectrum of electromagnetic radiation is shown in the image below.
Spectrum of Electromagnetic Radiation. The visible spectrum is shown as colors.© 2013 Encyclopædia Britannica, Inc. Downloaded from Image Quest Britannica; BYU-Idaho.
Light Spectrum Wavelength and Peak Absorption from Cone and Rod Cells.Title: Spectrum.jpeg; Author: http://webvision.med.utah.edu/;Site: https://books.byui.edu/-Yjww;License: Copyright © 2015 Webvision: Attribution, Noncommercial, No Derivative Works Creative Commons license.
The image above shows the peak absorption of each of the cone cells as well as the rod cells.
The nature of electromagnetic radiation, and hence visible light, cannot be described using a single model. Some of light’s properties can be explained by describing it as a wave. For example, the color of light that we perceive is based on the wavelength of the light waves. However, other properties suggest that light exists as discrete packets of energy called photons. The image above shows the relationship between wavelength and the energy in a photon of light. The shorter the wavelength, the greater the energy. Hence, gamma waves have very short wavelengths and contain large amounts of energy while radio waves have very long wavelengths but relatively small amounts of energy. The portion of the spectrum of electromagnetic radiation that we can perceive is referred to as the visible spectrum and includes light with wavelengths between 380 (violet) and 700 nm (red).
When light strikes an object, one of three things will happen. If the object is transparent the light is transmitted, meaning it will pass through the object. However, if the object is not transparent the light will either be absorbed or it will be reflected. The color that we perceive as we look at an object is due to the light that is being reflected off of it. Hence, if we see yellow, the yellow wavelength light is being reflected and the other wavelengths are being absorbed. Objects that appear black to our eyes absorb all of the light that is striking them while objects that appear white reflect all of the light that is striking them.