RGB calculation: Color picker and display (wrong), exposure module (solved)

Thank you Mica,

to my humble opinion the issue has nothing to do with DT working space and color profiles. It is just how the pixel calculation is done. May be you can try my posted PNG file. I doubt, that there is any special setting in DT to do the calculation and display correctly.

Here is a screenshot of my Smath calculation result:

In DT you can play with all profiles (input, display, working) and even with all set to sRGB (web safe) the color picker and display is incorrect.

Well for sure you can see the different pipeline processing or something going on for display/preview of this image… If I select 100% or anything greater directly from the dropdown I get yellow or green display… whereas anything under 100% zoom or any scrolled zoom will display as more the red…


Note main preview and zoom/pan preview are not the same.

200%

Arbitrary 172…

On my screen 100 and 200 are more green…this doesn’t show in chrome as I am looking at it here now…

Yes, thank you Todd.
For high zoom > 100% of course the display turns better, because you see the single pixel better.
Open the checkerboard file with Gimp and it is displayed correct for ALL zoom values.

This should always (like in Gimp) be the resulting
and correct effective (perceived) color:
mltc_rgb-188-188-128
This is RGB=188,188,128 and not the red with G=128
from the wrong DT color picker and display.

Y it was just interesting to see the different processing in DT 100 200 400 or any setting that I could go to directly from the dropdown looked like what you are showing… if I scrolled one click then I got the more red version… so 105 195 250 850…any percentage so DT must use a different scaling or processing for any zoom not in that list??

Affinity photo seems to get fooled as well then

And other tools…

How did you calculate the number you found??

Seems like the color is correct and as you zoom out and the averaging increased the display gets closer to the color??

Dear Todd, dear Mica, dear DT experts,

the wrong sRGB color calculation is not a new thing and I really do not understand
why a sophisticated tool like DT does address highly complex modules
but does NOT address the basics of RGB calculation for display and color picker.

A couple of people raised the topic multiple times as a general issue
of most software tools for image browsing, (pre)viewing, editing, scaling …
Since 2007 (!!!) Eric Brasseur about “Gamma-Scaling-Error” on his website
www.ericbrasseur.org/gamma.html with the famous test image of Dalai Lama.

The math and solution is well defined in sRGB standard IEC 61966-2-1 since 1999 (!!!).
The standard has to be purchased, but all relevant formulas are published.
For example here: en.wikipedia.org/wiki/SRGB.
In the chapter “Transformation” you find the gamma-companded and gamma-compressed formulas. They are defined stepwise, a linear area and an exponential area.
On my website www.mtlc.eu/dam/srgb.html you can find a couple of graphics of this function.

The principle with sRGB is:
For any pixel calculations you have to convert the nonlinear coded sRGB values
back to linear values. Then you can process and make any manipulations.
For example the average calculation of color picker or resizing images.
After this you have to convert this result back to nonlinear coded sRGB.

I assume, that this calculation is done correctly in all DT modules with state “lin RGB” processing.
But I will check step by step, if this is really always the case. Especially the “last” module with scaling to specific output pixel dimensions is most important.

Without correct scaling of images in any zoom not equal to 100 %, the displayed image
will be wrong and the result is subject of misinterpretation!
This does not affect homogenous color areas, BUT it does affect any small details
(color and brighness variation between pixels).

How and to whom shall I address this DT issue? Thank you for any advice. May be a direct contact to the SW authors? I am hesitating to explain this simple basic topic in Github in detail. I can understand Aurelien, who complains about GUI extensions in DT. Better concentrate on the “hidden” basics. sRGB standard is now 24 years old and apparently still ignored quite often.

The darktable github is the place.

Thank you Mica. Done!

Here is a good color picker: onlinejpgtools.com/jpg-color-picker
who does the color calculation exactly how it should be.
It can not only pick from jpg, but at least also from png files

You can start with from 1 px to more pixel eyedropper diameter.

Following is a screenshot with my above checkerboard and the correct effective color with 15 px radius.The checkerboard is not displayed correctly (scaling issue of all browser), but the measurement result is ok.

But you need to upload a file. That is why I would really like to have an offline color picker tool, with all these features! Or even better implemented in DT or/and Ansel! :heart_eyes:

@dtorop Is working on updating the colorpicker code from what I can see… It would be interesting to see what he would have to say …

Its here if you are interested or want to provide feedback…