Advanced editing with darktable tone curves

In a previous post, we discussed using darktable’s base curve tool to adjust the tones in a photo. This post will look at the other main curves tool: darktable tone curves.

How do curves work?: A review

In the last post we dicussed how curves allow us to map particular pixel values to other values. For example, the deault value of the base and tone curve modules is a straight line:

Default value of the curve modules
The default of the curve modules is a straight line

 

However, lets say we want to add contrast to our picture. In the base curve module, where the curve represents the brightness of each pixel, we can add an S-shaped curve. This will make the bright pixels brighter, and the dark pixels darker, increasing contrast.

Adding a curve to the straight line changes the output values of each pixel in a smooth fashion.
Adding a curve to the straight line changes the output values of each pixel in a smooth fashion.

The alternative, inverse S-curve decreases contrast and makes the picture look flatter.

Consider this curve for a second, and appreciate it’s power. We can make the curve infinitely complex, changing only certain parts of the picture but because the curve ensures a gradient in the degree of change, we reduce the chance of posterization. And we can combine it with masks (drawn or parametric) to apply it to particular geometric regions.

Beyond brightness: darktable tone curves

The base curve module affects the brightness of the pixels, and offers a single curve. The tone curve module allows you to edit animage in LAB colour space, opening up much more potential for editing.

The LAB color space is beyond the scope of this tutorial, but briefly it has three axes: L, a, and b.

  • L is the luminosity, i.e. how light or dark something is.
  • a is an axis that varies from green to magenta
  • b is an axis that varies from blue to yellow

When you open up the tone curve module (found under the tone group), you will automatically be presented with the curve for the L axis. You can edit it just like the base curve, by clicking and dragging on any point to create an inflection point. Editing just the L curve in the tone module will have a similar effect to editing the base curve.

darktable tone curve L

The dark histogram in the background shows the distribution of pixels along that axis of Lab colour space.

By default, the a and b axes are adjusted automatically to balance the tones as you adjust the L curve. If you want more control over the colours, set the “scale chroma” option to manual. Depending on the picture, this can be a pretty good way to make colours really “pop”.

By default, the a and b curve have a central inflection point. By keeping this fixed, and editing the curve on either side, we can vary the intensity or a color without changing the tone, i.e make a green more or less green as in this example:

darktable tone curve ab centered with arrows
By keeping the central inflection point fixed in the a curve, we can keep greens as green, and magentas as magenta, but vary the strength of the colour.

However, if we adjust the central inflection point, then the overall tone of the picture will change. In this example, moving the central inflection point makes the greens turn to magenta:

darktable tone curve ab moved with arrows.png
If we move the central inflection point of the a or b curves, the overall hue of the picture will change (here it will become very red).

If you play around with the central inflection point, you will note that even a small adjustment can have a huge change on the overall hue of the picture. This is because most photos only occupy regions of Lab color space very close to the center of the a and b axes (e.g. as shown by the very narrow histogram in the example above). Unfortunately darktable doesn’t currently allow finer control of these curves, although that feature will hopefully appear at some point in the future.

Further reading

Leave a Reply