New Primaries module

I literally was just messing around this morning for 10 min while I had a quick coffee so I thought I would pull up the vectorscope and mark a patch on the image and then start watching how it moved and how the other colors were impacted when I moved sliders… On my PC at home the yellow patch moved as if rotating and then circled in towards the center. I didn’t seem to drive it out of bounds like I did here on my pc at work… so I need to go back and check… That is why I was wondering if my display profile was somehow getting in the way… I will also check that…

1 Like

Finally played around with this today. A nice addition, fun module! Certainly easier to grasp than channel mixer. Worth to compare ‘normal’ blend mode with ‘chromaticity’.

I’m wondering if it might be better to increase the soft limits from 20 to 45? 20 allows a change from blue to teal, whereas 45 allows a change from blue to cyan. For achieving results close to reality 20 is good, but more creatively, to achieve certain harmonies when colours need to be pushed a little further, 45 would help. I haven’t played around enough to know what a standard adjustment would be, and it no doubt depends upon subject matter and taste, its just that on the first picture I played with I needed to set one of the hues to 40 to achieve a harmony.

1 Like

Generally yes, because it can adjust saturation etc, but if it is only about the RGB matrix part (channel mixing proper), then my understanding is that the two modules have exactly the same degrees of freedom.

The reasoning is this: the primaries module has 8 sliders, while the 3x3 RGB matrix has 9 entries, but if we consider exposure a normalization (eg that one would not use an c\cdot I_3 matrix to adjust exposure and exposure only), then it has 8 degrees of freedom (+ exposure).

Hello,

Looking at the photos of the Sigmoid project https://github.com/darktable-org/darktable/pull/15104 , I can’t wait to test it and see what happens :wink:
Will the “primaries” also make it possible to recover details in the highlights with the new version of Sigmoid ?
Greetings from Brussels,
Christian

I think for the most part this is a color tool but you might be able to tweak it in such a way to give a perceptual bump I don’t think your making a big correction to offset the detail loss from compression

Thanks for the suggestion. I’ll keep this in mind. Luckily this is something that can be changed without breaking old edits. I’ll see what kind of feedback is given by others.

Personally I would use this module mainly for rather small, delicate adjustments. There a narrower soft range makes sense.

Indirectly there might be an effect on the highlight details, but it’s not the primary goal. Anyway, the new settings will reduce clipping / posterization in some cases of bright highlights, so that might bring back some detail (e.g. images like this one). But there’s no sort of explicit “detail recovery” done.

1 Like

Would “RGB Primaries” work as the name? I think that gives more of a clue what the module is about than just “Primaries”.

Something else I wanted to mention is that I’m glad this is using percentages for the purity sliders. I know it is a somewhat different approach to the channel mixer, but one big gripe I have with the channel mixer is that it uses values from -2.000 to +2.000. While that may be accurate and make sense from a technical perspective, it’s not user friendly when you are trying to maintain a value of 1.000 in each channel and therefore doing quick math in your head to compensate for a slider adjustment.

My mental arithmetic isn’t too bad, but it’s certainly not good enough to instantly work out what value my input G should be when my input B has gone down to -0.063 and my input R has gone up to +1.095. I’m sure most people just move the sliders to get a pleasing result, but sometimes I want to be more precise. In this respect, I can imagine this new primaries module will be a lot easier to use.

2 Likes

it’s already merged with exact that name :wink:

2 Likes

OK, great! Well, carry on everyone, I’m 2 steps behind obviously :slight_smile:

1 Like

For those who may not have discovered it yet, Boris (@s7habo) has included an introduction to the new RGB Primaries module and its use as part of his Ep. 75 - Color harmonies part 4, from 34:07.

5 Likes

I have just had a play with the new module in the Windows weekly build. It certainly seems much easier to use than the channel mixer. However, I’m not sure I’ve fully understood the functionality of the module based on my testing.

My initial understanding of the module was that it is a way to affect the red channel, green channel and blue channel independently. But this is obviously not the case because the red, green and blue sliders have a global effect on the image, i.e. all colours are affected by each slider.

So, can someone please clarify why changing the red hue, for example, also changes green and blue hues in the image? What balance is the module always trying to achieve and why?

Watch Boris video. He explains some of it.

1 Like

If you fire up the vectorscope you can sort of see what goes on… if you think of the color wheel with rgb each spreading out like a fan and as they overlap you get magenta cyan and yellow… so very very generally the effect anyway maybe not the math is that you can see in the vectorscope that red and across from it cyan rotate when you rotate the red slider moving the position of each… So the net result is a sort of addition of red and cyan to an adjacent area in the chosen direction and the removal of it from the initial position and the resulting colors are the blend of that selected shift… Then you can sort of move the xy coordinates of the colorspace with the purity… its a bit like impacting the chromaticity… I think… anyway using something like this and marking the very light mid and darker selection from each of the primaries can let you follow how they move and judge the result…

Thanks Todd. I can see what’s going on, but I’m wondering why we’re altering all hues, as in, what’s the purpose…?

I’ll watch Boris’s video to see if he explains it. I’m still on ep.3 of his colour harmonies video so I haven’t got to the part about the new module yet.

Ok, I have watched Boris’s video where he introduces the new module. It’s a nice introduction but I’m still a bit confused why the module functions the way it does.

This picture of the RGB circles from Boris’s video nicely illustrates my misunderstanding of the module:

I have outlined the blue circle in red to show what I thought the blue sliders would influence. The blue circle intersects with red and green to create the magenta and cyan colours, but it does not affect pure red, pure green and yellow.

In the module, pure red, pure green, yellow and all other colours are affected by changes to the blue primary slider, so the module is obviously working differently than this picture.
Is there a better image or diagram that illustrates how this module works?

My other query is a more practical one: if I feel the yellows in my photo need to be warmer and more orange, how would I approach it with this new module as there isn’t a “yellow” slider? Is it like the channel mixer where we need to choose the “opposite” colour (red-cyan, green-magenta, blue-yellow)?

None of this is meant to be a criticism of the module. I’m sure this is all part of my general misunderstanding of colour theory, even though I’ve been trying to get my head around it now for a couple of years!

Now assume you account for a rotation of that whole area of blue…

Set a rotation… I find around 112 is about as far as I can go and then some out of gamut stuff seems to happen and the calculations lead to a breakdown of the image… If you set it both positive and negative you have a nice large range to rotate and see how the rest of the colors track…

4 Likes

If you read the pull request for this module, there is nothing that says that changing values for one color won’t after other colors. Actually, flannelhead (the author) states the opposite!

Quoting:

The nice part of this parametrization is that the achromatic axis isn’t affected - what’s grey remains gray after adjustments. Also, the opponency relationships between the colours are preserved under this adjustment. If you increase the purity of the blue primary, the opponent yellow’s intensity increases to balance things out. If you twist the blue hue toward cyan, the opponent yellow is twisted toward orange.

Even though the sliders refer “red”, “green” and “blue”, all adjustments are global and affect the colourimetry of the image. Hence this is not at all a similar tool as color zones and the like. This is mostly suitable for small adjustments but is also kind of forgiving as there are practically no artefacts produced due to the underlying operation being linear.

3 Likes

Yes, I have read the pull request and I know the module does affect all colours of the image. I’m afraid I’m not explaining myself very well. I guess what I’m trying to work out is why the module’s behaviour is desirable as opposed to more local adjustments. Where @flannelhead says “the nice part of this parametrization is…”, why is it nice? Why do we want that? From a usability point of view, why do we want all colours to be affected when we push one slider rather than more local adjustments? Why do want it so that “If you twist the blue hue toward cyan, the opponent yellow is twisted toward orange”?

Again, this is in no way intended to be a criticism. I’m sure there is a good reason for its behaviour and that there’s a time and a place to reach for this module. I also understand it’s more of a replacement for channel mixer rather than colour zones, as described in the PR. And my query applies to channel mixer as well. Why and when is it better than using something like colour zones, colour lookup table, colour balance RGB, etc.?

We are speaking of primaries and in most colors (if not all) on your images you have the 3 primaries present. Of course some colors have more of R primaries than others for example but it is very unlikely to have pure primaries on a picture.

One answer would be when you want more global adjustments, for example when trying to match different cameras ‘look’ or jpg matching it can be just the thing…
But other than TBH I’m not sure that there is a good answer except that it’s up to what method is preferred - personal preference I suppose, combined with the look you want to achieve. I realize that brings the question back though - what look is suited to? I don’t know…