Digital cameras use white balance in order to get the right color in the right type of light.
Most cameras have between 1000-10000K (kelvin)
The camera must meter the light to figure out if it is sunny, cloudy, indoor light... and choose the right tempature to use.