Been a long time since I posted here. Tried to figure out what requirements a module like this needed for darktable but havenât been successful so far. I especially focused on how to do the rgb-ratio method (filmicâs preserve color option) in a robust way but I have been unsuccessful so far. Note that I wanted to find something better than the filmic implementation as it doesnât handle all inputs well enough in my eyes.
The white star when doing hue preservation
So, giving this module some attention again I decided to ignore the rgb-ratio method for now and focus on the dynamics of hue preservation instead. You might remember that showed the results of doing a simple hue correction in post 180 (or not then jump back there and read it again). The problem with this method is that it creates a star-like pattern along the primary color axis. Like this:
Compared with no correction:
Note how much the vectorscope changes between the two methods!
A quick explanation of the white star pattern:
First observe that both the primary and secondary axes actually are correct in the non-corrected version, simple per channel operation. That means that these colors are unchanged in the hue corrected method and that white star is the correct behavior! Itâs the colors in between that have become darker due to the correction which has lowered the emission value of the middle channel.
We can quite easily correct for the reduced emission value by for example saying that the corrected emission sum should be equal with the uncorrected emission sum (or weighted sum, or the luminance, etc). The result of that looks like this:
Yey the weird star along the primary colors are gone! But⊠New problems have been introduced
We have a weird âinvertedâ star along with the secondary colors and our boundary colors arenât reaching 100% display chroma. The problem with the boundary colors can also be observed in the vectorscope where we get these arches of maximum chroma along the boundary. You will have to take my word that this is true for any exposure setting of this test triangle which means that we will never have fully saturated colors that arenât on the primary or secondary axes. We solved one problem but introduced two new ones⊠Iâm still debating with myself about possible ways forward here. Itâs impossible to both fulfill any luminance criteria and achieve 100% chroma at the boundary so there has to be some sort of tradeoff if it is at all possible to solve.
A third option which I myself am growing fond of is to say that the white star is ok but expose the amount of correction as a user-configurable variable. And just use whatever fits best for that particular picture. A 67% percent correction looks like this for example, and manages to reduce the negative effects of both methods to acceptable levels, not perfect but acceptable:
Another view of the problem
So before we make any big conclusions from the above. Letâs view the same test charts but as circles instead of triangles! The chart is the same as the triangle but in a circle generated using the old (and broken?) HSV method.
For anyone who wants to try it themselves, not that the exposure is a bit different from the triangle. Forgot that I made the triangle with the average plane = 1.0 and did the new one at 0.1845 instead. I have manually picked rec 709 as my input profile so that I can view the entire result.
color_wheel.exr (983.8 KB)
Same order as before, preserve hue:
No correction, i.e. simple per-channel operation
Constant emission sum when correcting hue
And finally 67% preserve hue:
I show these as itâs interesting and it teaches us something, the preserve hue option creates this almost perfect circle for chroma when viewed on an HSV chart. And I know, I know, the HSV method is a garbage âcolor spaceâ as it is very poor at modeling our actual sensation of colors. This is because it models what a monitor can show not what a human sees. What it does show though is the possible display gamut as a circle by rescaling the chroma of the triangle such that 100% chroma aligns with the rim of the circle.
That is all I have for now on the topic, hope someone learned something. Someone might even be able to pitch in with some ideas on how to proceed on this topic!