The effect of distance is adjusted by the lens. In a camera, when the lens is used to focus it moves toward and away from the film. In the vertebrate eye, the lens doesn't move with respect to the retina, rather the lens changes its thickness. If the object is far away, the lens is thinner because the ciliary muscle relaxes, thus the choroid layer moves away from the lens, making the fibers tight pulling on the lens. There are three types of cones, those that are responsive to red, green and blue, respectively.
Color is determined by how strongly a group of cones are stimulated.
Visual pigments are found in the membranes of rods and cones. Retinal undergoes an isomerization when exposed to light, which causes a hyperpolarization resulting in an action potential. Each type of photoreceptor has different type of opsin which results in response to different kind of light. In rods, the pigment is called rhodopsin.