I’ve recently started to play with art, I think it’s a great piece of software and I really like the primaries correction in the channel mixer.
Thanks @agriggio for the good work!
I’ve read the paper linked in this post but it isn’t an easy lecture and I haven’t looked yet into the art’s code, I wanted however to figure out how this tool could works.
Premise:
If we have a photo with a wide gamut color profile ( eg rec.2020 ) and we assign a wrong and narrow color profile ( eg. srgb ) to it, the image will appear less saturated.
original image with rec.2020 profile (and converted to srgb for displaying purpose)
same image with rec.2020 profile and srgb assigned profile
The easy conclusion is that this happens because the rgb primaries are farther away from the center (actually the white point coordinates)
I’ve used vapoursynth for the follow test, more precisely the fmtc , primaries plugin
Here’s his brief description
Performs a gamut conversion given a set of three primary colors and a reference white to another set of primary colors and a target reference white. Illuminant conversions are done using the Bradford method.
All colors are given in xyY colorspace, with their x and y coordinates.
The usage is very simple, it takes the source r,g,b,white-point chromaticity xy coordinates and the destination r,g,b,white-point xy chromaticity coordinates.
This values could be found in the wikipedia page too.
Of course the math for the color space conversion is more complex.
Now finally the interesting part.
The goal to be achieved could be for example the blue desaturation in the srgb color profile.
What we need are the blue and white point xy coordinates (b=[0.150,0.060], w=[0.3127,0.3290])
Now we have to find the straight line between these two points and choose a point outside the blue-white point segment
In the end we have pratically a different color space
That’s it, now a pratical example.
I’ve exported this image from darktable with the 2020 linear profile (converted to srgb for displaying purpose)
The source xy coordinates (rec.2020 primaries and d65 white point) are
r 0.70792, 0.29203
g 0.17024, 0.79652
b 0.13137, 0.04588
w(d65) 0.31271,0.32902
The two points that we need for the calculations are blue and white, I will not post here the math but it’s easy to calculate the value of y when x is 0.0001(randomly choosen), in this case the result is -0.15895811624.
The destination xy coordinates are
r 0.70792, 0.29203
g 0.17024, 0.79652
b 0.0001, -0.15895811624
w(d65) 0.31271,0.32902
And this is the result (converted to srgb for displaying purpose)