LCh Chroma blend over gray: net Lightness of underlying layers determines blended color
This issue affects GIMP-2.99 and also GIMP-2.10. Tested on Debian Sid using babl/GEGL/GIMP updated yesterday.
The net Lightness of an underlying neutral gray layer determines the resulting color when using LCh Chroma blend for an overlying color layer. There are two possible "correct" results, neither of which are actually happening:
-
The "by definition" correct behavior is that in all cases when blending a color layer set to Chroma blend mode over neutral gray, the resulting color should have L=L of the underlying layer, C=Chroma of the top layer, and h=0/360 (magenta-red) because the hue of gray is indeterminate.
-
The "better for editing" behavior, which I think is already programmed into babl, is that a color layer blended with neutral gray using Chroma blend mode should remain neutral gray, C=0.
The screenshot below shows two basically identical layer stacks, one created and open in GIMP-2.99, then other created and opened in GIMP-2.10. In both cases the bottom layer is solid white, the middle layer is solid black, and the top layer is Cyan, with the LCh values L=70, C=45, h=180. The only difference in the layer stacks is the opacity of the black layer, which is 100% for GIMP-2.10 and 64.6% for GIMP-2.99.
As set up, the layer stacks allow (and the screenshot below shows) two easy ways to vary the net Lightness: either by varying the opacity of the black layer, or by using Curves to change the Lightness of the black layer. Both ways can be used in both versions of GIMP with essentially the same results: The resulting blended color varies wildly from neutral/near-neutral gray (Chroma=0 or is very close to 0) to "colorful" colors of various hues, all with Chroma=45.
In case anyone wants to check this behavior out for themselves, the attached XCF files are at 32f perceptual precision in GIMP's built-in sRGB color space. Similar results obtain when using 32f linear precision and also after converting to color spaces other than built-in sRGB, such as linear Rec.2020 from disk.
Of course in GIMP-2.10, converting to color spaces other than built-in sRGB produces wrong LCh values in general - not even the resulting L value is correct.
See also: