This adjustment, called white balance, is found in all digital cameras today.
There are several settings for white balance in a digital camera that fall under the terms auto, preset and manual.
Automatic White Balance. This adjustment evaluates the overall field of view being captured by the image sensor, examining it for any color bias. If there's any bias, it attempts to zero it out. Unfortunately, this averaging makes many assumptions, one of which might be that there's a lot of white in the scene you're photographing. If that's the case, the image might be what you want, but if it isn't (and experience proves this is usually the case), then the color-balance adjustment that the camera performs will be less than desirable. This can be a problem especially when it removes the warm light at sunset.
Preset White Balance. There are preprogrammed white-balance settings that are akin to loading up your digital camera with daylight or tungsten film, or adding a color-balancing filter to your lens. Some of these presets (such as those indicated by the ubiquitous sun icon or the ever-popular cloudy mode) are specifically designed for certain hours of the day. For both color correction and creative control purposes, you may decide a certain preset gives you the look you like in conditions it wasn't designed for, however. Many photographers like to shoot with cloudy or flash settings outdoors in all conditions because it warms up the scene, for example.
Manual White Balance. In its simplest form, you point your camera to a white card (any white card or even a neutral gray card will do), engage the manual white-balance function, and the camera makes the necessary adjustments to the RGB values of the CCD to produce white. The steps to do this vary from camera to camera, so check your manual. This also is sometimes called custom white balance.
It's important to note that the adjustment or correction to the captured image may not be as simple as adding the same amount of red to every pixel in the image in order to compensate for a cooler light source. This is why it can be more difficult to correct for poor white balance in an image-editing program than it is to get the white balance adjusted properly in the camera.