Confused about D50, D65, and CCT in white balance and color calibration modules

I recently started using the color calibration module instead of the white balance module for all my images. One thing that really confused me was why the color temperature of everything seemed wrong. For example, a photo in direct noon sunlight looks balanced at 3972K5000K instead of 6500K, like I would expect. I finally realized that if I set the illuminant for that same photo to “same as pipeline (D50)” and back to “D (daylight)”, the temp will be 5002K and the color looks right. Seeing that the camera reference temperature in the white balance module is 6502K, it seems like that the difference between the CCT I would expect, and what the color calibration module actually displays, has something to do with the difference between D50 and D65. This reddit comment from AP seems to confirm that.

However, I still don’t totally understand why this is. As far as I know, light temperature is objective, not relative to your workflow’s illuminant. Midday sun is 6500K regardless of whether your workflow is D50 or D65. I can’t find any context where it would be 4000K5000K instead.

Now, if I set the white balance module to 5002K, the color calibration module will display color temperatures that make sense to me. But, 1) this displays a big red warning on both modules that I’m doing something wrong, 2) this requires me to create a preset and apply it to my photos, whereas I can apply 6502K just by clicking reset on the white balance module, and 3) there must be a reason why the D65 illuminant/6502K is the camera reference default for the white balance module rather than D50. I see that AP explained why in the comment I linked, but if using D65 makes all the CCTs in the color callibration module wrong, and using D50 makes them right, doesn’t that make the D50 illuminant/5002K the right reference for the white balance module?

Clearly, at least one of my assumptions here are wrong. I would greatly appreciate it if somebody could point out which one(s). Thank you!


You need to basically ignore color temp if you use color calibration…they don’t really mean anything… you are working with an illuminant in the CAT colorspace so its a different concept… THere is a fair bit of nuance to the module but the creator has 2 or 3 excellent videos… basically setting WB to the lightbulb ie reference values which are D65 values for your camera then this combined with settings in your input profile and calculations made in the CC module apply a luminant to “white balance” the scene… CC uses the full rgb information whereas wb comes from single channel values to create the “white balance”…Using CAT for “wb” is a perceptual exercise to try and make neutral items perceived that way in the scene to appear that way on the display or under display conditions. In the end for the most part WB module set on Camera reference and CC set to as shot will be roughly identical to as shot with WB alone… with one caveat . If there are any issues or bias in your D65 reference values then the process will be altered… THere is a suggested way to help to try and find better values if the default ones are not satisfactory…

Its explained here how values are calculated and why the term invalid is used… He starts to dial in around 20 min and presents the direct issue around 28…


Well, no. 6500K is daylight under an overcast sky (or open shade). Direct sunlight at noon is closer to 5000K. The exact value will probably vary a bit due to light scattering (blue is scattered more than red).
And according to NASA “raw” sunlight, before it hits the earth’s atmosphere, is 5772 K (of course independent of time of day).

Also, that 6500K in the white balance module is a reference value, unrelated to the actual image. It serves to provide a fixed starting point for the color calibration module.


Interesting. I was going off sources like this:

which says

CIE Standard Illuminant D65: Mathematical representation of average noon sky daylight. Color temperature: 6500K.

CIE Illuminant D50: Mathematical representation of ‘horizon’ daylight in the early morning or late afternoon. Color temperature: 5000K

Also, that 6500K in the white balance module is a reference value, unrelated to the actual image. It serves to provide a fixed starting point for the color calibration module.

I get that. My point is that using 5000K as a reference value in WB seems to make for more plausible color temperatures in the CC module, and was wondering why 6500K would be used instead.

The color temperature of a light is what’s measured staring at that light. You really can’t say that temperature applies to all of a scene as there’s so much reflection going on. Shooting under daylight is a good example; a lot of the illumination is coming from the air-reflected sky, not the direct sunlight.

Really, once you walk away from the scene, any consideration of the color temperature of the illuminant is lost; all you have is the RGB encoding of all that light in your capture. Then, the relevant question is now white balance, what it takes to make a thing in the scene that’s supposed to be white, white - that is, R=G=B.

Even then, the balance you choose probably won’t be strictly that. You might want interior shots to be warmer, where the red will dominate in the known-white patch. Or, you might have an interior lit by warm light with windows to the exterior illuminated by various aspects of sunlight. Which do you balance for? Time for masks…


because that’s the assumption the used color coeffs in wb module are defined.
You can drink 20° temperatured water or put it in form of cubes into a drink. You just need to make an assumption on the used scale: Celsius or Fahrenheit.

Not that I am an expert but I think that AP went to great length to suggest that IHO the K values are shit or something to that effect. He then goes on in some detail as noted in the video above and on other occasion to state that the values are only really even meaningful if at all when the illuminant is close to the ideal curve…


So from that point of view to use the CC module, but to then hack it to get/target numbers that are a bit of a moving target in many cases in order that they might look better (more representative) would defeat the design of the transform… However if it works for you go for it…

Basically if you WB you take 3 numbers, one for each channel and you make white … “white”… If you move to the concept of WB via CAT then you are trying to make scene neutral to look scene neutral on your display for which the general illuminant is D65 and that will be different from what was at the scene. The CAT is trying to do the correction that our brains do on site when we look at neutral object under changing or variable light once we have adapted to that light… It makes sense that these numbers would not relate directly to a simple scaling of white.

The workflow starts with D65 reference values because they are selected to make something neutral as achromatic as it can be to get the best possible result from the demosaicing process

The whole thing is fairly well laid out by AP along with the assumptions used and a few caveats like not using custom input profiles… and the explanation of CCT calculations and relevance

EDIT : I think this is basically the same text in the DT manual

We need to keep in mind that white balance correction is fundamentally about correcting the non-linear response of the particular camera:

Note I’ve turned off the white balance tool, which would have applied the multipliers show in the Camera: selection in the parameters pane, so-called “as-shot” multipliers.

Isn’t that what sunlight is, though: close to the ideal curve? It’s possible I missed something, but everything I heard AP say in that video, and that I’ve read from him in the docs and elsewhere, specifies that color temperature isn’t relevant for things like artificial light, but it sounds like it’s still useful for natural light. From the docs you linked:

However, when the illuminant is far from daylight, the CCT becomes inaccurate and irrelevant, and the CIE (International Commission on Illumination) discourages its use in such conditions.

…which implies that when the illuminant is daylight, the CCT is accurate and relevant, no?

I shot a photo of a gray card in the direct sun around 2:40pm PDT yesterday (not quite midday; I’ll try to repeat exactly at noon when I get the chance).

Using only the white balance module and spot checking on the card, I get 5681K for the color temperature, which is in the 5000–6000K range that I would expect:

Changing white balance to camera reference and using spot check in the color calibration module, I get 4384K (black body). So, at least according to Darktable, we’re not far off the ideal black body curve, but we’re well under that 5000–6000K range that I would expect from direct sunlight.

Lastly, I tried my idea of setting WB to 5002K and 1.000 tint, then using the spot check from color calibration on top of it. It got 5590K (around where I would expect), but it also said we’re too far from the ideal curve for that temperature to be valid, so that idea doesn’t seem to be a good one after all:

I also loading the raw into Photoshop on my work computer. A spot check on the gray card came back with 5500K .

So maybe this isn’t about D50 vs D65 after all (or, at least, I can’t fix it by messing with the white balance color temperature), but the color temperatures reported by the color calibration module 1) should be still relevant for photos taken in sunlight and 2) are way off, by about 1200–1500K, from what I would expect from the lighting conditions. Maybe I need to look into profiling my camera.

1 Like

Edit: maybe download the image mentioned below, and read the bold parts first / only.

I do not claim to understand color calibration.
If you set color calibration to D50 (same as pipeline), it does not change white balance (disabling/enabling the module makes little difference, maybe gamut compression). Since the white balance module is set to the D65 reference (~6500 K), this (no adaptation, staying at D50) means the effective (scene) temperature remains 6500 K (as set by the white balance module).
It is my impression that the temperature shown in color calibration is not the CCT of the scene illuminant. Rather, it’s some kind of ‘tweak’ that needs to be applied to bring the colours coming from the D65 reference WB coefficients really into the D50 of the pipeline. That is, if the scene was really illuminated with something close to 6500K, CC would show something close to 5000 K (as no change is needed, the original 6500 K white point was already successfully remapped to 5000 K by the WB module alone).


I believe those 4200-4300 K values are to compensate for the fact that the camera reference D65 was too cool/bluish (too high a temperature). Applying the D65 reference WB + the input colour profile would have taken neutral/white, if the scene had been illuminated by D65, to D50 (lowering its colour temperature), so it took the real white/neutral 5200-5300K (see WB readings above) to 4321 K, which then color calibration now brings back to D50.

In other words, I believe that 4216/4321 K do not correspond to the scene illuminant, but rather where the D65->D50 (6500 K → 5000 K) transformation mapped that illuminant (estimated by the camera / WB colour picker as 5216/5341 K).
6500 K → 5000 K
5341 K → 4321 K
5216 K → 4216 K

This may well be bollocks. I just ignore the numbers in my processing, BTW. :slight_smile:


I would agree that this is the way I think of it working… Its a perceptual correction to the display based on the D65 whitepoint and hence the warning if you change the values. If you set WB module to something like 3K then you get a 12 or 13K CCT correction based on that assumption of the scene and when you look at the wording in the tool tip it seems to indicate that this is what is going on at least I think so …

1 Like

Opened color calibration to report original illuminant CCT · Issue #14630 · darktable-org/darktable · GitHub

1 Like

For my use case, I had to calibrate my sensor to D65 in the White Balance module to get realistic CCT values.

If your display is calibrated to show a D65 white, take a picture of your display showing white in a color managed program and use the color picker in the White Balance module and save as an automatic preset to your camera.

1 Like

Thanks, I’ll give that a shot.

Also unless you are masking and have complex mixed or artificial light …good old WB is fine. I use CC module a lot but actually not for WB…

1 Like