Digital cameras don't 'see' any color at all. We'll get back to that in a moment.
For more about the RGB color model see -
RGB color model - Wikipedia, the free encyclopedia
Human eyes work in a non-linear way. The analog image sensors in a digital camera can only 'see' in a linear way, and the image sensor only see's luminosity (no color).
http://www.adobe.com/digitalimag/pdfs/linear_gamma.pdf
A pixel is a device that developes an analog voltage based on how many particles of light strike it during an exposure. A single particle of light is called a photon.
Photon - Wikipedia, the free encyclopedia
The voltage a pixel developes is very small, even if a lot of pixels fall on it, and the voltage has to be amplified. How much the voltage gets amplified is what the ISO setting on the camera is about. At low ISO the voltage is amplified less than when the ISO is set to a higher value.
Once the voltage of all the pixels has been amplified, all the pixel analog voltages are changed to a digital value in a analog-to-digital converter. Those digital values are either 12-bit (4096) or 14-bit (16,384) discrete values of luminosity (no color).
http://wwwimages.adobe.com/www.adob...ly/prophotographer/pdfs/pscs3_renderprint.pdf
Most digital camera have a Bayer Array in front of the image sensor. The few DSLR's that have a Foveon image sensor (Sigma cameras) are different.
This is what is in front of a 4 pixel square of pixels. One pixel only developes its voltage based on the intensity of the red part of the light hitting it, one pixel only developes its voltage based on the intensity of blue part of the light hitting it. Two pixels only develope their voltage based on the intensity of green part of the light hitting it, because human eyes are more sensitive to green light.
Bayer filter - Wikipedia, the free encyclopedia
Before the digital values that come out of the A/D converter can be made into an image several steps have to be taken. Based on the layout of the Bayer Array, a software algorithm interpolates what color of light fell on each pixel. that process is called 'demosacing'. Even though a single pixel was covered by a red Bayer Array element, the digital signal levels of the adjacent pixels is taken into account by the demosaicing algorithm to infer how much blue and green light actually fell on the pixel covered by the red filter. The same is done for the other adjacent pixels.
Active pixel sensor - Wikipedia, the free encyclopedia
Next a non-linear gamma curve has to be applied so it looks like something humans eyes actually see, because what the image sensor produces doesn't come anywhere close.
http://en.wikipedia.org/wiki/Algorithm
http://www.bhphotovideo.com/bnh/con...getpage&Q=newsLetter/The-Photographic-Eye.jsp
http://en.wikipedia.org/wiki/Foveon_X3_sensor
Below is an approximation of what the image sensor actually produces, having a linear gamma curve and being grayscale, followed by an unedited Raw conversion (using ACR) that has a non-linear gamma curve applied and interpolated color.