You will never have an “universal” correction profile, for the following reason: every pixel recorded on your camera sensor will have a value
where f(\lambda) is the spectral radience by wavelength \lambda and s_C(\lambda) is the sensitivity of your camera’s sensor to color channel C, we can think of C = R, G, B. It is important to note that f is an infinite-dimensional object (a spectrum) and your camera compresses it to 3 scalars (actually, 1 scalar at each point unless you have a Foveon sensor, so on a Bayer sensor it is interpolated).
Information is lost, you will never get it back. This would not matter if the s_C matched the sensitivity of the cells in your eye (the Luther-Maxwell-Ives condition), but they don’t. All the color in an image is essentially guesswork.
One approach you could take is a linear correction with a matrix. Specifically, take a bunch of colors i = 1, \dots, N in a test chart, record their properties, eg in sRGB space, then try to find a matrix A so that
is minimized, where r_i etc are the “known” color values and \tilde{r}_i etc are the sensor recordings. This you can do with an iterative method, or least squares. But it is important to understand that this is an approximate correction and comes with no guarantees. Again, information has been lost, and there is no way you can recover it.
It is tempting to imagine that you can decompose A = L B to part B that is independent of white balance, and L that is diagonal and stands for the white balance correction. But unfortunately it does not work that way, as the illuminant factors into the f above.
So, what do you do in practice, especially if you have access to the wonderful Darktable 4.6?
- Make sure that your monitor has decent colors, ideally calibrated, but a lot of them are OK out of the box these days. Set up your OS accordingly.
- Forget the color checker unless you are especially required to match exact colors (eg product photography or similar). It is impractical and unnecessary for a hobbyist, and most color checkers have colors well inside the gamut.
- Learn to use color calibration and its cousin rgb primaries, and fine tune with color balance rgb. Try one instance for practice, but accept the fact that in the general case, you will not be able to correct the colors with just one instance of any of these modules (you need to explicitly or implicitly mask areas, eg using color balance rgb). Practice. It may take hours of fiddling on one photo, but it will be faster for the next, and even faster afterwards.
- Learn to use presets, save and reuse various corrections, especially for a batch of photos taken under similar conditions.
Yes, this is daunting, but it is a skill that digital photographers need. A huge investment as the tools and the theory are not trivial, but it pays off. @s7habo has amazing videos starting at