Feature #9908

Color Zones: tweak blending to increase usuable hue range

Added by Mirek Kratochvil about 6 years ago. Updated about 1 year ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
hardware architecture:


Hello everyone,

When using "Color zones" plugin, I noticed that the hue modification doesn't actually work very good when selecting "by hue". The modification was more or less "halfway" to the point where it should be, e.g. hue couldn't be rotated for full 180 degrees (simplified: "you couldn't shift green to red").

The behavior is caused by "blending" of changes for low-chroma areas, which is done to avoid artifacts on gray (where computed hue varies wildly among pixels). This is currently done too strong, even for colors that wouldn't be affected by the artifacts.

My suggestion is to completely avoid the "blending" on hue channel - the artifacts that are created by that are not as extremely bad as those created by messing with luminance (chroma is already low on grey, so there's nothing big to break anyway), and in the bad cases (I wasn't able to imagine any..) they shall be easily avoided by using any reasonable denoise.

Git branch with simple fix&explanation is here:

Thanks for comments on this,


#2 Updated by Tobias Ellinghaus about 6 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete
  • Category set to Darkroom

Did you take care that existing history stacks keep doing what they used to do? After a quick glance it seems you are breaking them.

#3 Updated by Mirek Kratochvil about 6 years ago

Nope, sorry about that -- I'm pretty new to darktable so I did just the smallest thing that fixed it for me. :D

Okay, what's the best method to do this correctly?

I was also thinking about other color-bending features and result is that several new controls in the plugin would be probably needed (also with separated control for the "blend" fixup from here...), do you think that a new plugin would be better here?

On IRC, I also heard something about that the widgets should change their shape a bit as well, I guess that'd certainly require new plugin.

#4 Updated by Jan Hrdina about 1 year ago

It seems like the github link is down. Could you please reupload it, @Mirek?

Also, here is another related issue, potentially a duplicate: #12126

Also available in: Atom PDF

Go to top