Hi all!
I am currently looking into improving the basecurve module.
The more modern tonemapping modules from the scene-referred workflow provide improved color management where the old base curve breaks - especially regarding hue shifts.
In addition, the current base curve module is a bit bloated IMHO - especially with the exposure fusion. Although it is a valid point to include such a functionality together with tone mapping, I believe that with the new modules like tone equalizer, it may be more appropriate to handle the dynamic range with those dedicated modules and let the base curve be a simple tool to define a transfer curve.
Why I still use the base curve?
Well!
The other modules define the tone mapping in a parametric way.
Here, the parameters often provide a more technical control - but less so direct artistic correspondence.
Good knowledge of the algorithm and color management is required to understand what is really happening when you change certain parameters and to predict what values will yield the desired image.
By the way, IMO the new agx module is a significant improvement here as parameterization is based on terminology that is quite common in vfx / film industry.
So, I noticed that especially when editing a lot of images for commercial work, fiddling with the parameters to get the look I want may can take more time than simply using the base curve, where I have direct control over the transfer curve.
So, sometimes, I prefer the base curve.
However, the old base curve module has it’s own caveats. In particular (in my opinion), the hue shifts without any color preservation are problematic - especially for skin tones and colorful highlights.
The available color preservation methods either yield problems with desaturation or control of lightness.
Sigmoid is liked by many users for the pleasing out-of-the-box look.
I assume this mostly results from the channel-independent mapping, which is also used by the base curve without color preservation. Especially with typical sigmoid-like curves, the channel-independent mapping may increase saturation for certain value ranges.
From a color-science perspective, this may be undesirable, as it breaks color consistency, but the results are visually pleasing and often have a “warm, film-like” appearance.
One may argue that this is valid in context of the processing pipeline because accurate manipulation should be done in the scene-referred stages, whereas manipulations in the display-referred space after tone mapping are perceptually driven either way.
Hue-Shifts are a problem, however (that’s why sigmoid etc. have optional hue correction)
And, most important in practical use for me:
Since a while, darktable allows values > 1 in the pipeline to support unconstrained scene-referred workflow without clipping between modules.
Filmic etc. handle this inherently by letting you define the black- and white point.
In the base curve, there is some extrapolation, but otherwise no controllable handling of the input range.
So, without exposure fusion, you need to compress the image range before the base curve, for example using a dedicated exposure module just before the base curve.
So, I have started working on an updated version and would like to know what you think about it!
Based on the findings above, I have employed the following design paradigms:
- Prefer visually pleasing results over rigorous color science → take the best from sigmoid

- Still, prevent hue shifts
- Only do one thing: applying a base curve while controlling input range
- Controls shall have direct artistic meaning
As WIP name I call the module “base curve rgb” to distinguish it from the old base curve.
The module has the follwing changes w.r.t. the old base curve:
- Exposure fusion was removed
- A slider to adjust exposure of the input was added → best to adjust exposure so that no cipping of any channel occurs so that input colors are not skewed.
- A histogram of the expose-adjusted input was added to help exposure slider adjustment
- Instead of multiple color preservation methods, there is one slider controlling the strength of hue preservation (like in sigmoid and agx). It preserves hue in OKHCL space as this yields better results than the method in sigmoid, especially for highlight IMO.
- A slider to preserve highlight saturation allows to compensate for the desaturation of bright, saturated colors in the roll-off regime
- The scale for graph slider was renamed and now has positive and negative range. This allows to also log-scale for the highlight region to facilitate more precise adjustment for highlights
- Also, some bugs were fixed. Most importantly, curve drawing had low resolution on large log scaling values due to sampling in linear space. Now, curve is always drawn smoothly.
You can find the code here (with a lot of rough edges
I’m mostly a python programmer and used my little bit of c knowledge + lots of help from AI to implement the module):
And the Appimage for Linux is here (import dialog does not work for some reason → I guess I have problems with my build environment…):
https://github.com/wilecoyote2015/darktable/releases/download/basecurvergb-0.1/Darktable-2.1.0+27203.g43252791a3-dirty-x86_64.AppImage
Please feel free to play around and share your thoughts!
There are still some issues to solve and I won’t be able to answer quickly as life keeps me quite busy, but I’ll give my best to improve the module over the time when I can ![]()
Here are some examples:
Vanilla Base Curve:
Preserve Hue:
Please note that I edited the image on an Adobe RGB display. Hence, the bright reds look a bit crushed in any version due to the mapping to sRGB gamut.


