Hue Rotation and Color collapsing

My guess is that there are attempts to keep things like ‘colorfulness’ more persistent , and/or the luminance/brightness of the colors. As in , there is ‘perceptual’ studd going on.

And then all colors don’t respond the same , which causes weird results if you are working on images that are computer generated.

The color calibration comes to mind , when people expected a pure channel mixer but that’s now how it works.

More and more parts of Darktable are meant to be used in the context of a light capture , not computer RGB values as in an ordinary image. Trying to use Darktable for things normally done in an image editor can sometimes cause weird results .

What do you mean by " ‘perceptual’ studd (stuff)". The manual states that color balance RGB works “in a linear RGB color space [which] exhibits a uniform spacing of perceptual hues while retaining a physically-scaled luminance”. And at output colours can be pushed back into range by changing chroma and lightness at constant hue. So that should give the expected results here (within the limits of the colour spaces used…)

Keep in mind also that computer RGB values are usually display referred, and can represent very saturated colours. Those can easily get out of the range of valid colours when manipulated in another representation.

As an example, look at the limits of the sRBG colour space. There are colour spaces that are enough larger that you can “rotate” the ‘sRGB triangle’ as much as you want without getting outside that colour space. But you can’t then go back to sRGB and hope to have all your colours intact as you rotated them out of the range sRGB can present. (even a rotation of 1° in the shown plane is enough to lose some colours).

Color balance RGB has built-in gamut mapping to avoid creating crazy colors.

When you rotate hues, you do so at constant luminance and chroma. But nothing guarantees than the new hue at same chroma still lies within the working RGB space gamut. So it gets clipped.

To avoid this, you need to reduce the global linear chroma. But ultimately, this is not very suitable for large hue shifts. Hue is an angle, in 3D color spaces, and you will have an hard time to blend large angle shifts smoothly.

1 Like

As an illustration, this is sRGB gamut shown in a perceptually uniform color space. The D65 dot is white, the main pointy things are R, G, B primaries. Rotating them of 180° around D65 does not end up in the gamut for all colors.

3 Likes