Short text guide to Color Balance RGB's '4 ways' tab

This is intended as a condensed tutorial on the ‘4 ways’ tab of the Color Balance RGB module. I don’t usually write tutorials like this, so please excuse me if I go into too little / too much detail.

Edit 1: Added info on the colour pickers, and images for example 1. Mention ASC-CDL in the offset section.

I have created a test image of sRGB values from 0 to 1.10 to help with visualising the effects. The xmp has a blur that you can remove if desired.
tone chart srgb.tif (61.9 KB) (licensed under CC0 1.0)
tone chart srgb.tif.xmp (6.7 KB)

Preface: ‘Linear chroma’ in the ‘master’ tab happens before the 4 ways tab, and ‘Perceptual saturation’ happens after the 4 ways tab.
Luminance and chroma sliders are soft limited (you won’t usually need to go outside of these limits), they all have hard limits of 100% for chroma, negative and positive 100% for luminance.
The chroma sliders add whatever hue you choose. If there is colour already in the image, you may need to adjust the hue slider to reach your desired colour, e.g. if you wanted to turn a yellow area orange, you would need to add red.

Global offset

This is known as ‘offset’ elsewhere (see ASC-CDL ‘SOP’ (slope, offset, power)). It affects all values in the image. It has a larger effect on lower values. It works like, but not exactly like, the ‘lift’ control in AgX ‘look’ section.

Luminance

Negative increases contrast. Crushes blacks (be careful!). Positive decreases contrast. Use this to raise blacks. Offset luminance on its own is usually unnecessary because the tonemapper afterwards is also built to raise or lower the black point. However, I’ve found some success in using this slider with masks to increase contrast in specific image areas.

Chroma

Will add a colour cast primarily to the darkest areas. Can be used to counteract shadows or power adjustments and neutralise the darkest areas, with negligible effect on anything brighter than shadows.

Power

This is sometimes known as ‘gamma’ elsewhere. It affects all values, except 0 and the ‘white fulcrum’ which is set in the ‘masks’ tab. It is recommended to use the picker for the white fulcrum when using power, as it ensures the normal function of this slider, which is to raise all image values when positive (and vice versa). Area of strongest effect is also dependent on white fulcrum - by default this is at (or near) middle-grey.
(White fulcrum doesn’t affect any other part of CB-RGB)
Happens after global offset. (If offset lifts values above 0, they will now be affected by power)

Luminance

Use it to affect ‘brightness.’ This will change the image’s mid-grey point. Similar to AgX ‘pivot target output’ or ‘brightness’ (in ‘look’ section).
Positive values decrease contrast in brighter areas and increase contrast in the darkest areas. Vice-versa for negative values.

Chroma

Use this for a colour cast on the whole image. You can counteract its effect in the brightest and darkest areas with the other three sections (global offset, shadows lift and highlights gain).

Shadows lift

Acts on the shadows region set in the ‘masks’ tab.

Luminance

Similar function to the exposure module, but with a parametric mask. Different result than ‘shadows brilliance’ in master tab.

Chroma

Use this to add colour to shadows and darker areas.

Highlights gain

Acts on the highlights region set in the ‘masks’ tab. Basically anything above the mask middle-grey point. There is some overlap between shadows, middle grey and highlights to avoid harsh transitions.

Luminance

Similar function to the exposure module, but with a parametric mask.

Chroma

Use this to add colour to brighter areas.

Examples

First let’s add a little classic ‘teal and orange’ in Switzerland. Download the CR2 raw from the linked post, as well as this xmp file I’ve attached, place them in a folder together and import them:
IMG_0026.CR2.xmp (11.3 KB)

xmp is made with DT 5.6.0, but it should open even on 5.4.1.
This xmp is a starting point, with no tonemapper active (i.e. Filmic/Sigmoid/AgX), and a default CB-RGB instance. Start by going to the ‘masks’ tab and pressing the picker icon next to ‘white fulcrum.’ It puts a selection box over the whole image and adjusts the value accordingly. Now press it again to deselect the picker and go to the 4 ways tab. Remember this step is all creative, the values are approximate, and you can adjust things to your taste.

  1. Set highlights gain hue to 65 degrees, and chroma to 5.00%.
  2. The red channel in some image areas is now slightly above 100%, so you may want to reduce the luminance slider here to bring that back.
  3. Set shadows lift hue to 230 degrees, and chroma to 5.00%.
  4. There is a little colour cast at the lowest end of the histogram/waveform. You can set global offset chroma up one step to 0.01% at the default 0 hue to mitigate this.
  5. Raise power luminance to 5% to put more emphasis on the trees and tyres, or lower it to put more emphasis on the car’s brighter areas.
click to show before and after

Example 2

Here is an old building in a dock in London. I’ve again included an xmp with minimal adjustments, but the scene’s exposure is raised and it doesn’t really say ‘6pm in October’ anymore. We can add some colour and tone adjustments to enhance the feeling a little.
Download both of these, put them together in a folder and import the CR2.
IMG_8526.CR2 (31.6 MB) (licensed under CC BY-NC-SA 4.0)
IMG_8526.CR2.xmp (8.9 KB)

  1. Start by going to Color Balance RGB masks tab and press the picker next to white fulcrum. Press again to deselect.
  2. Go to 4 ways tab. Change highlights hue to 60 degrees and chroma to 6%. Set luminance to +50%.
  3. Change shadows hue to 250 degrees and chroma to 17%.
  4. Change global offset hue to 20 degrees, chroma to 0.15% and luminance to negative 0.40%.
  5. Change power luminance to -25%, hue to 300 degrees and chroma to 0.50%.

It’s now a little more harmonious. (click to unblur result)

You can add local and global contrast to taste with other modules, of course.

Colour pickers

There are pickers next to each hue slider. By default, these select an area. They will provide the opposite hue of the selected area’s average (before any changes introduced by the module), and all four provide the same chroma percentage. A simple option for starting to neutralise colour casts. Ctrl-click to select the same hue instead. (This also changes from area to single point mode so it gets a little bit confusing)

That concludes just about everything I know about the 4 ways tab.
Tutorial written for @Tim and for anyone else who’d like a text reference.

18 Likes

Thank you. I have bookmarked this and will study it.

2 Likes

Very nice, thanks for the writeup!

2 Likes

Just a general note, if I’m allowed to.
I think the tutorial should be more clear and describe the new (unfamiliar) concept (“offset”) using only known concepts.
Instead it explains an unknown concept (“offset”) using another concept, which could be also unknown/unfamiliar to the reader (“lift”). This may be confusing for some (new) users. :wink:

1 Like

A good point; best I could do was the note about the larger effect at lower values.
Explaining why addition and subtraction works the way it does in the default linear rec2020 working profile is a whole other essay. (If you change working profile to sRGB then offset’s effect is a perceptually consistent translation instead of the skew towards lower values!)

2 Likes

Ouch! Ka-Boom!

The UI should totally reflect the order in which transformations are applied, this seems like something needing fixing.

5 Likes

Picked that tip up from Boris, I thought that quirk needed special mention.

4 Likes

You could insert this link as it explains CDL and LGG color wheels and the terms…

I feel like the manual mentions CDL as well but I would have to go back and read it…

1 Like

I believe perceptual brilliance also comes after but are we going to move 2 sets of sliders?? Maybe just indicating it in some way??

Header names could become

(pre-grade) and (post-grade) instead of grading to indicate that adjustment and the tooltips could be added to??

One small addition might be to mention the pickers and noting that by default they will set the hue and chroma to cancel the color cast of the selected roi, or you can add 180 in the data box or ctrl-click when selecting your roi to actually select the color of that area so as to enhance it rather than cancel it out…

2 Likes

Oops, I remembered those once, and then forgot them again. I look at them so little that I didn’t even know that ctrl-click selects the actual colour.
The ctrl behaviour’s a bit finnicky, it also swaps between point and area mode so you have to press a few times to get the mode you want.
All the pickers give the same chroma result

2 Likes

Thank you for a written tutorial. I for one learn best by reading and following examples like this. I know videos are popular and there are many excellent ones out there but I find learning from a video difficult. It is just my learning style and I know I might be in the minority but I am not alone. I too have booked marked this tutorial, downloaded the image and will work through it. Thanks.

4 Likes

I don’t have a concrete proposal, I just said that the UI should make it clear. Labeling things differently would be a good starting point.

3 Likes

This question might be a little bit beyond the scope of your write up, but reading your tutorial I was wondering something.

This is very helpful to know. What if I don’t trust myself to figure out which hue do I need to mix with an existing hue to get a desired hue? For example: I have a bunch of yellow-orange-red hues in my image and looking at the vectoroscope I decide I need some blue to have a complementary harmony. How can I introduce my desired blue directly into my image? Do I have to use the Colorize module?

You might enjoy this series of 3 videos to master harmonies and the one that follows on using the channel mixer https://youtu.be/2-fO2QrpN9c?si=3sh8MEObceHfXwyp

1 Like

The video’s that @priort linked are masterful. Highly recommended.

But if video isn’t your thing -

Your question is a bit general. I would say that for this case you might choose to shift overall color of an image with a different tool like rgb primaries. At the bottom there is “tint hue” and “tint purity.” In my simple-minded view, purity is similar to chroma. (For definitions see: darktable user manual - darktable's color dimensions).

As an exercise, you might take your chosen image after WB/Color Cal, activate rgb primaries, and bring up the vectorscope. You could then set the hue to some color you wish to add, then bring up the purity. FYI you can go beyond the soft limit of 20% purity, just right click and type in a larger value if desired). To add blue just select a blue hue and bring up purity. It can be instructive to watch the vectorscope.

The power of the four-ways tab of Color Balance RGB is that you can do the same thing to deep shadows, shadows, mid-tones, and highlights independently, PLUS you can also lighten or darken each zone as desired, PLUS-PLUS you can use the mask tab to adjust the ranges for each of these tones.

In @gwbarn 's example 2, the London Dock, he applies a popular type of split-toning (changing the color in the brighter tones differently than in the shadows). It is very common to add some bluish hue to shadows (cool the shadows) and some reddish hue to highlights (warm the highlights).

I took his example and set chroma on the main tab to -100%. That gives the result below. I think this shows only the color adjustments from 4-ways tab:

2 Likes

My quick response to that would be: Complementary colours cancel each other out; if the shadows or highlights sliders don’t give you the effect you want, then consider drawn + parametric masks, or the tint slider in rgb primaries module (also with masks).
Colourise module is also okay, and with blending modes/opacity

1 Like

Thanks @gwbarn for this fine write up and another thanks to some very useful additions in the resulting discussion.

You’ve opened up the 4 ways tab a step further for me and the mask tab comes in sight as well :slight_smile:

Darktable i.c.w. this forum brings me further in using colors much more then when using my previous raw developer.

This is both thanks to and a compliment for the makers of darktable and its very nice user community here.

3 Likes