Colour (calibration) matching from a 4-panel colour (checker) reference

Hi, I’m trying to work out a workflow and it feels like I’m banging my head against a brick wall every time I revisit this.

In my industry, there’s a regular need to take photos for record keeping, archival reasons, and information sharing. Accurate colour capture is important a lot of the time, and it’s essentially an industry standard to take photos with four-panel colour checkers like these: Photograph of a pocket reference scale - this version is credit card sized, with an 8 centimetre scale, a 20 millimetre scale, a three-panel grey card, four colour reference panels, and a rectification target. The reference colours are red, yellow, green, and blue.

I have worked in RAW for a long time, and I’m comfortable with the workflow required for a 24 or 48 panel colour checker, but I’ve found a backlog of unprocessed RAW photos at my current company where, it turns out, no one at the company knows how to process RAW photos. They just use the camera JPEG outputs.

I have not corrected colour from a four-panel colour checker before, and I cannot find any information on using them for colour correction. With a 24/48 panel checker in Darktable, it’s easy as there are built-in workflows; but I can’t find any way to pick a known colour, indicate a specific colour value, and calibrate around that.

I have the CMYK values of the cards used, and have converted them to the RGB and hex values. But I cannot work out a way to calibrate the colour using these cards other than by eye.

N.B. I am not referring to white balance correction with the grey patch; I am specifically interested in colour calibration from the r/y/g/b panels.

Can anyone suggest a workflow for this scenario?

1 Like

Welcome to the forum. :slight_smile:
I’m not really in a position to say much about this, but the spot color mapping in the color calibration apparently accepts direct input in Lch - darktable 4.4 user manual - color calibration (about halfway down this page).

The problem I see is that this will only work on one color at a time - i.e. it will try to match one of your four colors with disregard for the rest… not much help probably.

1 Like

I’m not sure the values from something like that are rock solid so I would use a tool and just open the vectorscope and draw a selection over the 4 patches and then rotate the hues so that red green blue and yellow line up in the vector scope… this is a common thing done in video… often a hue vs hue tool is used but the new primaries curve and or channel mixer could likely easily do it… THere is hue rotation in color balance but you might need 4 instances for that…


Hi @HeyItsRobin welcome.

If accurate colors are a must, its my understanding that the color checker passports have, more or less, the bare minimum amount of swatches.

I don’t think you’re going to get great color accuracy from four swatches. White balance looks like it’ll work well.


@HeyItsRobin : Are those four swatches supposed to be used for calibration/profiling, or are they controls, to verify an existing calibration has been properly applied?


Thanks! As you say, I don’t know that it’s a complete or ideal solution, but I’ll have a fiddle later and see if it’s something that helps improve the results!

1 Like

Hi @paperdigits, my counterpoint to that would be that non-standard colour checkers have a range of uses in scientific applications. A great example - and the closest similarity I can find (though I still can’t find any information on their workflow and approach) is the various designs of colour calibration target used on NASA’s Mars rovers, like this one and this one. Note especially that the first one featured in the first link has four colours, two grey values, and white and black - only one more value (and a grey value at that) than the card above. The one in the second link has just six panels, one of which is specifically for IR wavelengths anyway. I’ve also found a few medical studies that use other configurations of up to nine colours to good effect.

They’re a seemingly common tool across a range of scientific disciplines, but I’m struggling to find any examples of workflows for handling them. 24/48 colour calibration would be my preference, and in my wheelhouse, but since this is data I didn’t produce I had no say in it.

@rvietor I don’t know 100% for a fact that they’re meant to be used for calibration/profiling, but everyone I’ve spoken to believes that’s what they’re for, and the NASA examples above would seem to corroborate that.


Hi @HeyItsRobin, and welcome.

Yes, you can achieve quite good results — not 100% perfect, since there are so very many factors that interplay here.

Your first obstacle: you say you know the CMYK mixture.
But how to convert that into RGB? Watch what color space you convert into: Color Management: Color Space Conversion

Is your monitor properly calibrated?

As I see it, you use that card as a reference, to be matched.

Using a simple ref card is quite easy:

Using full color is a bit trickier: My first color management experiment

Our forum offers more info: Natural skintone with reference colors

This area is great fun — but tricky as ****.
If I were you, I would start experimenting with darktable’s LookUp module: darktable 4.4 user manual - color look up table

Have fun!
Claes in Lund, Sweden

1 Like

As I read the article from, those targets are used with a calibrated system to account for environmental variations.

If those raw images you have to process are taken under standardised conditions, and the system to acquire them is still in use, the easiest solution might be to get a shot from a 24 or 48 panel colour checker, get a profile from that shot, and then use that profile. Then use the 4-patch chart to check in the individual images.

With only 4-7 patches, you just don’t have enough information to create a reliable profile, unless you assume linear responses for each colour channel. Then you’d need at least 5, and probably 7 data points:

  • a camera offset (zero point) for each colour channel
  • a slope for each colour channel, but you may be able to just use R/G and B/G values
  • two variables for white balancing.

Even in a linear system, the actual transformation is something like

\begin{bmatrix} r\prime \\ g\prime \\ b\prime \end{bmatrix} = \begin{bmatrix} a_{rr} & a_{rg} & a_{rb} \\ a_{gr} & a_{gg} & a_{gb} \\ a_{br} & a_{bg} & a_{bb} \\ \end{bmatrix} \begin{bmatrix} r \\ g \\ b \end{bmatrix} + \begin{bmatrix} c_r \\ c_g \\ c_b \end{bmatrix}

where A and c have 12 degrees of freedom, -1 if you adjust exposure to taste later. c in Darktable is usually taken care of in the camera profile, leaving A 9-1 df, so you need at least as many color swatches.

But in practice, way more because of noise. 24 is the practical minimum.

1 Like

@rvietor and @Tamas_Papp thank you for such informative answers. So, if I understand right, the four-panel swatch on the scale card above should be used with a calibrated system and it can then be used to check, in post, that the colour values are correct - but not to adjust them? What does calibration entail in DSLR photography in this sense?

I have been pushing for ages for broader internal adoption of 24-panel colour checkers, at least in a lab setting and in a specific set of field settings where colour is important too, so hopefully this gives some more weight to my argument.

1 Like

This all depends on what you know (control, assume) about your light source and the camera, the spectrum of your light source, the colors you are photographing (do any of them have a very narrow spectrum that has only partial overlap with the light source? this can happen with led-based lights not intended for photography) and how much you care about color reproduction.

Of course every single calibrated swatch adds some information. You could project into a subspace with some norm and minimize that… but you have to be very careful since (because of noise, etc) the system can be very ill-conditioned and you could easily end up with worse colors than simply doing nothing. I would not pursue this.

Given how cheap you can get a 24-swatch color checker, I think the most efficient use of your (and your coworker’s) time would be to just use one. Eg every time you photograph a bunch of objects, take a shot first for a specific camera and a specific light, then make a preset and apply that to all photos.

1 Like

@Claes takk for informasjonen. Det var veldig interessant og jeg skal leser det igjen med mer oppmerksomhet senere! Takk fra Australia :slight_smile:

In darktable, you can just use a feature in the color calibration module, to create a module preset that’s correct for that camera under certain lighting conditions, as @Tamas_Papp mentioned.

Or more universally, you can create ICC profiles that can be used as input profiles in darktable or other software, although even these can need differences depending what software will be using them. I have used Lumariver profile creator, which is a paid version of the opensource DCamProf software, to create profiles for my main cameras. Incidentally, the Lumariver website has some quite good explanations on how it’s done and how it works…

Edit: There’s not much difference, technically speaking between these two methods - the all-in-dt approach has the benefit of being able to make new presets “on the fly” as it were, if you just take a snap of your colour checker whenever you end up with a new light source. It’s detailed fairly well in the darktable manual, in that page I linked above. Does need careful reading though… :wink:


While I think of it, if buying a 24-patch, do check that it is a model supported by darktable…

I don’t know how likely one is to find one that’s not, but worth bearing in mind. :slight_smile:

1 Like

Here is my question and I am happy to be shot down in flames by more knowledgeable people. If you matched the grey patch to neutral grey would not the other colors set themselves correctly? This seems to be the principle used in set a manual white balance in cameras. Yes I appreciate that color saturation would also come into play to get the correct ‘vibrancy’ to the colors.

1 Like

So the images are already taken using this card? Did the team use different cards (ordered at different dates, kept in different location)?

Calibrations in general need a repeatable and traceable standard. If the images are taken using different cards, then you introduce an error (in this case color error), when you use card A vs card B. Card A could be from a different lot of cards with slightly different colors than B OR someone forgot about it in the car and it was exposed to UV light for some time, OR it is a 3 year card and the plastic degraded or the color degrade (they proudly describe the card as biodegradable) OR the card has dirt… I think you get the point. Unless the cards are controlled, old ones thrown away, you might not get consistent results.

Sure, lots of calibrations exist, and my comment made a lot of assumptions because you have been quite vague about what it is you’re doing.

If you’re doing infrared, specialized medical imaging, or shooting photographs on a different planet, mentioning those things up front would help you get a higher quality answer.


Are we not complicating things too much???

The OP’s card is typically used by museums
and within archeology.

It is a reference card, nothing else.

The task is to make the shot image look
like reality on the monitor, irrespective of light
conditions, camera peculiarities, &c.

Right, @HeyItsRobin? [g’day, mate]

Have fun!
Claes in Lund, Sweden

1 Like

Bang! Bang! PM sent.