The human eye is able to see images and colors because of the specialized photoreceptor cells in the retina called rods and cones. The membranes within these receptors contain pigments that undergo chemical changes when they absorb light. The chemical changes trigger electrical signals that travel to the brain, where they are interpreted as colors and visual images.
The rod photoreceptors function in dim illumination and can generate an electrical response from a single detected photon. The cone photoreceptors are better suited to bright light, but are less receptive than the rods. The cones never saturate, regardless of the intensity of ambient light. There are also different classes of cones, each with a distinct range of sensitivity to the various wavelengths of light that are ultimately interpreted by the brain as colors.
The three wavelength ranges that the cone cells are sensitive to represent what humans and many vertebrate animals interpret as the colors red, green and blue. The many varieties of color perceived by the brain are based on the relative intensities and proportions of those wavelengths that are received by the brain. Retinal ganglion cells transmit the electrical signals coming from the retina and also help to sort out the varying red, green and blue color signals produced by the photoreceptors before they reach the brain.