space invasion: luma light only and darken only for AnyRGB
Here's a patch that allows GIMP-2.99 to use space information to calculate luma lighten only and luma darken only layer blend modes:
0001-Make-luma_lighten-darken_only-blend-modes-work-in-An.patch
Here's a screenshot showing GIMP-2.99 with the patch applied on the left and GIMP-2.10 (which uses hard-coded sRGB LUMINANCE values from libgimpcolor/gimprgb.h) on the right:
Here's a sample test file in the Identity color space, which has all luminance information in the Green channel. So solid Magenta has a Y of 0. Zoom in to 800% - it's a tiny file because I had some print statements in the code loop to verify how it was working (removed for the patch).
This is a bit confusing to look at on the screen, because "clearly" the magenta layer is brighter than the dark green layer. This is because the conversion of Identity Magenta to the monitor profile produces a color with a positive R and B channel, and a very negative G channel (convert the file to sRGB to see what I mean). But the negative G channel value is clipped to 0, making the Magenta color "look" bright, when really the color is "black", has zero luminance.