We experience color by means of two kinds of sensors in the retina of our eye: These are known as rods and cones. The former ensure vision at lower levels of illumination, while the latter account for higher light levels and the color that we see.
There are three types of cones, which separately sense three different portions of the spectrum, Red, Green and Blue. Our perception of which color we are seeing is determined by which combinations of sensors are excited and by how much.
Rod cells - although very sensitive - cannot create color images. They only provide information about the light levels present. Their high sensitivity however, ensures that we are able to distinguish shapes and forms in relative darkness.
It is the brain and nervous system that consecutively perform extensive processing of the rod and cone output, to allow us to discriminate between millions of colors and generate the color image that we see, although effectively we can only see 200.000 different colors at any one time. The JPEG file format is designed to exploit the limitations of the human eye, notably the fact that small color changes are perceived less accurately than small changes in brightness. Therefore in saving a file as JPEG, color levels are compressed more than brightness levels.