color calibration CAT16 blackened areas - bug or feature?

Given the following colour wheel:

Applying the preset swap G and B:

Then setting adaptation to CAT16:

OpenCL on/off does not matter. Darktable master version.

@Pascal_Obry , @hannoschwalm , is this a bug or a feature?

clip negative rgb does not fix it:

Not even a 2nd instance does (basic channel mixer + clipping option):

It is unaffected by gamut compression:

But can be avoided by adding another instance before the channel swap, and applying gamut compression there:

The black area is present with working space set to default (Rec 2020), sRGB (web-safe), Rec 709, linear Rec 709, HLG P3 RGB, Display P3 RGB, linear ProPhoto RGB and many others, but not with Adobe RGB (compatible):

Also not with sRGB-elle-V2-g22.

Looks strange on first thinking.

Thanks. Opened color calibration CAT16 blackened areas · Issue #16875 · darktable-org/darktable · GitHub.

I assume the fact that the blues basically disappear (are replaced by purples) is due to Rec 2020 ‘blue’ being something we don’t really perceive as ‘blue’? No such problem with sRGB / Rec 709, so after a simple swap (no messing with the adaptation, leaving it as none):

Swapping B and G in linear Rec 2020:

In linear Rec 709:

You can see it on this exr file as well…

None

Swapped

Swapped CAT16

The dark grey here was 55 55 55 and it has gone to 73 38 68

Fixed by @hannoschwalm , soon to arrive on the master branch. Note that you’ll still need to clip negative values: