Quote:
There's probably a way to mathematically deduce the correct R, G, and B value adjustments to do a white balance. Just eydropper sample a spot on the photo that's supposed to be neutral gray or white, and then figure it out from there.

It isn't just a case of just adding whatever is necessary to get 255, 255, 255 or 65535, 65535, 65535 if you're using 16 bit colour for that spot then?