1. A method comprising: for a pixel in a digital image, calculating a product of a red component value of the pixel, a green component value of the pixel, and a blue component value of the pixel, wherein the product comprises the pixel's red value (R) multiplied by the pixel's green value (G) multiplied by the pixel's blue value (B); in response to the product satisfying a condition, determining that the pixel belongs to a particular set of pixels; determining a gain factor based on red component values of only those pixels that belong the particular set of pixels, green component values of only those pixels that belong to the particular set of pixels, and blue component values of only those pixels that belong to the particular set of pixels; based at least in part on the gain factor, adjusting at least one of the red component value of the pixel, the green component value of the pixel, and the blue component value of the pixel; wherein the method is performed by a special purpose computing device.