Can I color-balance a photo if I know the light source within the photo?

I took a photo without bothering about color balance, and the color temperature came out too low. In other words, the scene looked yellow to the eye, but the photo came out orangish:

If I had noticed this problem when I was at the scene, and I had a grey card, and the time to use it, I would have. But since I'm no longer at the scene, it's too late for that.

But I do know that the lights in the frame are sodium vapor lamps. Can I use this information to color-correct the photo? How do I tell Lightroom to color-balance the photo so that the sodium vapor lamps are the color they should be?

• Sodium light has a wavelength of 589 nm, you can see here that monochromatic light with that wavelength corresponds to x = 0.57 and y = 0.43. So, what you can do is transform to XYZ space and rescale X and Z such that x and y take the values corresponding to the D65 white point and then transform back to sRGB Dec 9, 2016 at 5:59
• It's slightly unclear whether you're trying to white-balance the photo to remove the color cast of the lights (the grey card, which doesn't work well with the narrow spectrum of sodium lights), or recreate the color of the scene as it appeared to you (which is mostly subjective, probably a setting between "daylight" and the extreme "corrective" adjustment for the color cast on the scene ). Dec 9, 2016 at 7:45
• I want the latter. Dec 9, 2016 at 8:13
• Dec 9, 2016 at 15:22

The color of the sodium lights as they looked to you at the time is a subjective perceptual phenomenon. Using a gray card in the lights wouldn't really help, because you're not interested in balancing away the color of the sodium vapor lights (which doesn't really work very well anyway).

If you were physically located within the illumination from another substantial source of light, you could take a gray card reading of that, which might be a useful starting point for what your senses were using as a reference. Most likely, though, if you were looking at a large enough area lit by the sodium, your visual system was doing at least some degree of adaptive compensation, attempting to make the colors of objects look more "normal" to your brain than they do to a camera.

Given all of that, your best bet might be to start with a white balance setting in the 5000-5500K range, which will show the lighting as it is relative to daylight, and adjust the temperature downward from there to approximate what you were seeing. You may also need to slightly adjust the green balance ("tint", or whatever Lighroom calls it) to your liking.

There is a contradiction between this two sentences.

How do I tell Lightroom to color-balance

and

the sodium vapor lamps are the color they should be

The sodium lamps are more or less that orange-yellow you have there.

A color ballance is cheating the image so the image looks as if was shoot with white light, so a white wall looks white, or neutral gray.

Option 1: If you have a preset, for example go another night with a gray card to another street with the same lights you could use that as a profile.

You open that image, color balance it, and use that same profile on consecutive images.

Option 2: Use an object that you think is white, like a specific wall. I tried to use the light iself, but as it is blown, the measure is not accurate.

Option 3: On Photoshop. There is a method that works decently on several images, and the result was not that bad.

1) Add a layer 50% gray.

2) Change blend mode to diference.