Abstract: By automatically compensating for unwanted lighting effects caused by varying ambient light sources, digital still images and video are made to appear more naturally realistic. A set of correction factors based upon an ascertained ambient lighting conditions, such as color temperature, provides for selectively color correcting only those pixels requiring correction. In this way, only those portions of a digital image having excessive color due to ambient light conditions are improved without affecting those portions of the digital image not requiring correction.