As you know, the human eye has light sensitive rod shaped cells that see light and shadow. These allow vision in dim light conditions however, this view will be monochromatic. The center area of the retina contains cone cells that are pigmented. These selectivity provide color vision. The majority of people have cone cells sensitive to red, green, and blue, the primary colors for mixing light sources.
The color vision we have is not fixed as to its sensitivity of colors. Our eyes have an amazing ability to make adjustments, in other words, an involuntary ability to shift hues based on conditions.
You can prove this for yourself. Procure some colored filters. Cellophane gift-wrap will do. Place a red filter over one eye. Stare about the room for a few minutes and then remove the filter. The filtered eye has changed its sensitivity (quire a lot), the un-filtered eye did not change. This involuntary color sensitivity change is eye independent. Try different color filters, and blink, right eye, left eye, you will be amazed.
OK, the camera, be it film or digital consists of a light sensitive material. The color sensitivity of film is adjusted using colored dyes called sensitizing dye. These alter the sensitive of film which in its natural state is only sensitive to violet and blue.
Digital cameras use colored filters over the light sensitive sights on the imaging chip. The color of the filters and the ratio of red, green, and blue filters, to each other is adjusted to force the chip to register colors in a similar way as does our eye/brain combination. Look up Bayer Matrix or Bayer Pattern on the web. The red, green, and blue filters over the light sensitive sites are arrange in a special pattern that modulates (modifies) the light that reached the photo receptors so that they mimic the human eye. Bayer is the Kodak engineer that figured this out.