match JPEG colors in Darktable

It would be nice if someone who knows can enlighten us… I will try the manual although I expect you’ve looked there already.

As far workflow goes I love scene referred as far as the rest of it goes, it’s just I don’t really like the complication of color calibration and the well known caveats with it, as, for me, usually, it doesn’t give any advantage.

2 Likes

I’ve just looked, and on my system, DT 4.4, with workflow set to none, different modules have different default blend colorspaces - color balance rgb is display, while diffuse and sharpen is scene…

A quick look in the manual -


I should check this experimentally, but maybe this is actually unrelated to the workflow setting in preferences and instead simply down to which module one looks at? :thinking:

The fact that they’ve removed the option to use the old white balance setting is one of the reasons I’m stuck with DT 4.2. It’s nonsense.

1 Like

I kind of agree, but it doesn’t really bother me as I’m quite happy with the ‘none’ option as I like swapping tonemappers, and so on… and that gives the old ‘as shot’ setting for WB. Apart from possible issues as discussed just above…

Ok, regarding CB… the color workspace is defaults to RGB (display) with ‘None’ and to RGB (scene) with ‘Scene referred (filmic)’.

Yeah, as I said, might be completly FUD from my side. But I would prefer to use the RGB (scene) setting, which I don’t get per default with ‘None’. I really don’t want to annoy anyone, just stating my opinion. The solution last time I mentioned this was, maybe to create presets (which save the color workspace setting). But its really hard to do this consistently (looking at my ~50 presets over all modules).

2 Likes

That may be, but I don’t think the casts that people notice for various cameras are a white balance problem, and consequently white balance is not the right tool to fix them.

To summarize,

  1. all cameras need a color correction matrix,
  2. adding one requires specialized equipment (a chart) and knowledge (to process this chart)
  3. this is apparently so tricky that no matrices were added in the past 7 years,
  4. lacking that, people can figure out a preset by eyeballing photos for their camera, but it is unclear
    a. how much these generalize to other light circumstances,
    b. if not, how to automate the process,
    c. where to put them in the pipeline.

Again, I am aware that I could just get a color chart for best results. But I am not after that level of fidelity because I am a hobbyist. I just want to get a linear mapping (a matrix) that gives a reasonable starting point.

I will now experiment and will probably find a preset that removes the cast. But the broader issue is that I see no systematic way to share these presets and avoid duplicating the work.

1 Like

I would add that the default dt matrix isn’t just one matrix for all cameras - I’m not familiar with it, but it seems to be quite accurate for many cameras - My Nikons for example are pretty close to my own matrix profiles, when using the defaults.

This is understood. That’s why I want to add one for my own camera. :wink:

1 Like

:+1: While I think of it, the other thing that needs doing if you want color calibration to be as accurate as possible is the custom white balance reference value… it’s detailed in the manual. Involves taking a photo of a 6500K light source - like a calibrated computer screen.

I’m wondering what would it take to add Adobe profiles support to DT? They are a great help for me in RawTherapee and ART. I can get good colors and tonal range right away without having to tinker with numerous modules.

1 Like

Quite a bit, adobe profiles are DCP, but DT only handles ICC.

You can generate ICCs from DCPs, I’m pretty sure.

There’s a matrix for every supported camera in darktable, well, actually in rawspeed. Each of those matrices was developed from a target shot of some sort, usually the 24-patch ColorChecker. That’s how matrices are made, from target shots (unless you have spectral data, ah get me going… :laughing: )

https://github.com/darktable-org/rawspeed/blob/develop/data/cameras.xml

Regarding Adobe DCPs, you can extract their matrix, look for the D65 ColorMatrix[1|2].

2 Likes

You can, using Dcamprof, but for someone like me who struggles with terminal applications it’s not easy to do it right. I tried a while back and couldn’t seem to get it right… but to be honest I didn’t try very hard as I was planning on making my own profiles.

I tried a bit too using something… I think it was called dcp2icc you can also break it down to a json file in dcamprof and the write it out but the dcp were d65 and dual illuminant and icc were d50 single illuminant and I don’t think you would get the same corrections in the icc from the hue sat tables… I was never able to land on a combination that seemed to create anything too useful… but thats my fumbling… To be honest from my experience messing around …DT-chart or the colormatch script from Pascal ( GitHub - pmjdebruijn/colormatch: ColorMatch ) were the best two in my hands to get something out of the gate that was matching the jpg… Personally I can live with just editing to taste…

1 Like

If you consider the hassle of making a glare-free target shot, converting the DCP to ICC is rather simple. Here’s what I did with dcamprof, using the Adobe Standard DCP for my Nikon D7000:

$ dcamprof dcp2json "Nikon D7000 Adobe Standard.dcp" nikon_d7000.json
$ dcamprof make-icc nikon_d7000.json nikon_d7000.icc

That sounds a bit like my experience - I did get a resulting ICC profile but it wasn’t “right”. I ended up settling for a custom profile to be accurate as opposed to jpg-matching.

But I’m well aware that this whole field is something that I’m not too worried about - so maybe I should shut up :sweat_smile:

Well, it looks like it… in your example! My result was distinctly odd in the colours… and I think I used exactly what you show… maybe I messed up somewhere.

Mine changed the colors also, why I never went past just figuring out how to ICC them. I have spectral profiles for all my cameras, but I just use the libraw-provided matrices for most processing, rendered colors are pleasing enough for me…

1 Like

I know that you have done a lot of tinkering and your work with the spectral stuff gives you great insight I am sure so nothing I say will be new to you and it might not even be correct but I think with darktable this issue is that people just need to settle on a white balance approach and then next on a color approach. For example you can use the legacy WB… read from your camera data and or set by selecting a neutral area. Traditional and fairly straightforward, ie that is a “white” balance. Or you can use the CAT method… which is as I understand it more of a neutral balance than a strict scaling of rgb to make white be white. The role of the CAT is to account for the perceptual aspect of color and to make things that were neutral in the scene appear neutral on the display device or even color appear the same. The result is often very similar to WB but not always. This seems to throw people and have them embark on endless journey to sort it out. The final variable and often something that is a problem is that the CAT calculation for this is based on a set of D65 reference values that have been shown to be off for some camera’s and so they can alter or impact the result.

THe CAT may be a “newer” approach or alternate one but just because its newer people don’t need to force feed it to themselves and I don’t think DT is severely handicapped if you don’t. You can mask it and this can in some circumstances be a benefit for complex images but in the end using legacy vs CAT for most images is not a handicap in my mind… I guess what I am trying to say is that the CAT is a different approach to introduce white or neutral balance to your image its not simply by default a better WB because its newer or more complex…

At least this is how I came away thinking about it from this…

Chromatic Adaptation explained.pdf (3.7 MB)

In any case getting wb sorted in your workflow is going to be the gateway to then work on getting colors that are either accurate or providing a look whatever the user is after…

1 Like

Oh, I agree completely. If the white reference isn’t set properly, there’s no way one can assess colors, either colorimetrically or aesthetically.

I like to use this exercise to demonstrate what white balance is combatting:

In the toolchain in the top-left pane, note there’s all the normal processing except white balance is turned off. This is not about temp/tint…

1 Like

Count me in that camp.
I did convert profiles from Adobe Camera Raw and Capture One to find something better for the Sony A7iv, but it didn’t work out. I think it may not only have to do with the conversion of the profiles, but also with the the input darktable is feeding into the resulting icc profile.

Anyways, I ended also up with a color checker and a custom profile.

1 Like