It might be said that the eye works rather like a camera (although the eye came before the camera!). A lens focusses the rays of light and the iris governs the amount of light that falls on to the retina at the back of the eye. The retina is a transparent lining which contains light receptors activated by the light. Some receptors are cones, which convey colour, whereas the receptors called rods cannot. The rods deal with low light situations. The cones are in three types, containing pigment sensitive to red, blue or green, which are the additive primary colours.
Note that there is some confusion over primary colours because the artist's primary colours are subtractive and are blue, red and yellow. In other words in equal chemical measure they combine in paint to form secondary colours of green, purple and orange and altogether form black.
But in the physics of light red, green and blue are called the primary colours, producing yellow, cyan and magenta as secondary colours and white as the product of all three primary colours. These three primary colours in different relationship form any colour. In fact the colours are wavelengths of the electromagnetic vibrations of light.
The cones work, like all light based equipment, with additive primary colours. There are about 7 million cones in the eye, individually connected to nerves for clarity, mainly formed in the centre of the retina. Only cones exist at the fovea centralis, a special area directly behind the pupil of a twentieth of an inch where the sharpest colour vision exists and where we focus to see the greatest detail of an object being looked at. There are about 120 million rods mainly concentrating towards the edges connected in groups. This is why at night it can be better to focus on an object to the side and one will never get detail! These rods connect to the optic nerve which takes the information collected by the eye to the brain for processing and understanding. Where the optic nerve joins the eye there are no rods or cones and the result is a blind spot.
Some people are colour blind - do you see the 5 and 8 here? If not you could be colour blind.
Artists note that the use of blue in a painting gives distance and red brings objects closer. Yellow is bright and sharp. Given that white light is made of different wavelengths, then actual different colours have slightly different properties of focussing. Yellow light focusses most directly on to the retina and the eye needs to make no adjustment. Red light focusses behind the retina, and so the eye must compensate by making the lens convex. This is what happens when focussing a close object, and so red gives the impression of closeness. Similarly the blue wavelength rests in front of the retina, and so the lens is made concave, and this is what happens with distance focussing. Although these adjustments are tiny, they are nevertheless made, and therefore give the impressions of depth.
Nevertheless, when colour reaches the brain it is perceived as well as simply delivered. This means that colour is appreciated. It is a psychological reaction. Colours and indeed objects which are pleasurable send a signal back to the eye to open the pupil wider to admit more light, and does the opposite to unpleasant objects.