Channel mixer spill

Hello,
I am playing around with the channel mixer, and when I modify the blue channel output, I get a spill on to the red and green channels. I don’t know why. Is it something to do with a calculation that isn’t in the doc? Or something I missed ?
I am in bypass mode with no gamut clipping.
For example. With this photo


I just reduced the input B in the blue channel from 1 to 0.468 and the red and green channels in the colour I picked changed in opposite directions.

Thanks,
Nicolas

It depends on the colour spaces you are working in. The color calibration in bypass mode is adjusting channels in the working color profile space, whereas the color picker is displaying the channels values after conversion to the histogram color space. When you convert from one color space to another, there is normally rotation and/or shearing of the basis vectors, which is why you are observing this “spill” effect.

1 Like

Maybe as a quick analogy, you’ve seen on a map how true north and magnetic north are in slightly different directions? If I go directly north towards magnetic north, I’ll be east or west or where I’d be if I went directly towards true north. By shifting coordinate systems, adjusting how far I go “north” in one coordinate system will result in me drifting east or west when expressed in the other coordinate system.
(so, in this analogy, going “north” is just adjusting the blue channel in one coordinate system, and drifting “east-west” are the changes you see in another channel)

1 Like

Without disputing your explanation, I would think this is normal behavior… the blue sky is dominantly blue but also has red and green components, so by dialing back blue the red and green become more prominent, hence the color shift. At least in my simple mind, it’s not so much a spill as it is attenuating a color component.

Maybe I misunderstood with OP was asking – since he had the gobal color picker up in his screenshots, I thought his concern was about how the numbers are shifting.

@nwinspeare, have we answered your question? If not, maybe you can explain a bit more about what you find puzzling and/or interesting?

If you are referring to the yellow cast introduced, that is because the sum of three sliders in B tab no longer = 1 (which is necessary to keep neutrals neutral). To rectify, increase R and/or G sliders by the same amount you decreased B.

If you are referring to the values given by color picker, it will show you the histogram colorspace, which is first run through display space. Therefore, the only way to get useful values from your color picker is to set both display profile and histogram profile to be the same as working profile. This will have the side effect of making the image look wrong, so don’t use it to make adjustments, only to look at color picker values.

I suspect this is it, ie the interaction with the colorspace conversions and this issue with it getting run through the display profile before hitting the histogram profile…made worse if if your histogram and working are not the same…

Demonstrated and discussed here… [RFC/WIP] Move overexposed before colorout by flannelhead · Pull Request #8051 · darktable-org/darktable · GitHub</titl and extensively hashed over in issue 3271 Choice of display profile affects histogram, color picker values and overexposure indicators · Issue #3271 · darktable-org/darktable · GitHub

That may be the overall picture…but as for the pixel only the blue value should change…

Math goes like this well explained here… Please help me to understand "Channel Mixer" - #13 by patdavid

Quick test…all set to linear rec2020.

RGB of blue square 15, 19, 159

After setting blue channel to 0.5

15 19 80

Thank you everybody for your answers. It is the rotation of color spaces between the working profile and color picker that was puzzling me.
I like the true north and magnetic north analogy!

1 Like

Its most likely the wedge of the display profile…much smaller than rec2020 between working and histogram profile…This should be a branched workflow not in line like that and I think it will get addressed at some point…its a bit long but if you go through posts I linked above you can see the issue and how it impacts color picker values as they are based on what you have selected for the histogram profile. It also affects what is shown for clipped values so again these are only accurate if you set the profiles all to be the same

Thanks, I will definitely give all that a read. Your help is very precious!

This is an interesting read as well…I have read some of these before …patents often go into some interesting details…

https://patents.justia.com/patent/20200120318
Bottom line is if you have working profile in one color space then your display color profile then back to the histogram profile …and in that order …there is a loss of fidelity going to the lower color space and then back up again… its should not affect output only the histogram and things based on that data…