A method of calibrating a color correction transform that corrects for infrared light, the method including: capturing, via a sensor comprising photosites (232, 233, 334) each having infrared, red, green, and blue parts, known color data as raw image data I RGB − IR raw, capturing, at a first time, via the sensor through a long-pass filter configured to block visible light, the known color data as long-pass-filtered image data I RGB − IR LPF, capturing, at a second time which is different from the first time, via the sensor through a short-pass filter configured to block infrared light, the known color data as short-pass-filtered image data I RGB − IR SPF, subtracting the long-pass-filtered image data for each of the red, green and blue parts of a photosite of the sensor from the raw image data for each of the corresponding red, green and blue parts of the photosite to obtain true color data (R, G, B) for each of the red, green and blue parts of the photosite, subtracting the short-pass-filtered image data for an infrared part of the photosite of the sensor from the raw image data for the corresponding part of the photosite to obtain true infrared data for the photosite, using data corresponding to the true color data and the true infrared data to produce mappings (237, 238, 239) of the true infrared data to predicted infrared components (IR R, IR G, IR B) for each of the red, green, and blue parts of the photosites, and a mapping of the true color data to a predicted color component (RGB IR) for the infrared part of the photosites; capturing different sets of raw image data, long-pass-filtered image data, and short-pass-filtered image data under different infrared lighting conditions, and using the raw image data, long-pass-filtered image data, and short-pass-filtered image data to produce different sets of mappings, each set corresponding to a different infrared lighting condition; and accessing data in the mappings to color correct an online-captured image, comprising estimating the current infrared lighting condition, and using the estimated current infrared lighting condition to select one of the sets of mappings to apply. capturing, via a sensor comprising photosites (232, 233, 334) each having infrared, red, green, and blue parts, known color data as raw image data I RGB − IR raw, capturing, at a first time, via the sensor through a long-pass filter configured to block visible light, the known color data as long-pass-filtered image data I RGB − IR LPF, capturing, at a second time which is different from the first time, via the sensor through a short-pass filter configured to block infrared light, the known color data as short-pass-filtered image data I RGB − IR SPF, subtracting the long-pass-filtered image data for each of the red, green and blue parts of a photosite of the sensor from the raw image data for each of the corresponding red, green and blue parts of the photosite to obtain true color data (R, G, B) for each of the red, green and blue parts of the photosite, subtracting the short-pass-filtered image data for an infrared part of the photosite of the sensor from the raw image data for the corresponding part of the photosite to obtain true infrared data for the photosite, using data corresponding to the true color data and the true infrared data to produce mappings (237, 238, 239) of the true infrared data to predicted infrared components (IR R, IR G, IR B) for each of the red, green, and blue parts of the photosites, and a mapping of the true color data to a predicted color component (RGB IR) for the infrared part of the photosites; capturing different sets of raw image data, long-pass-filtered image data, and short-pass-filtered image data under different infrared lighting conditions, and using the raw image data, long-pass-filtered image data, and short-pass-filtered image data to produce different sets of mappings, each set corresponding to a different infrared lighting condition; and accessing data in the mappings to color correct an online-captured image, comprising estimating the current infrared lighting condition, and using the estimated current infrared lighting condition to select one of the sets of mappings to apply.