Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.94k stars 328 forks source link

Change background in Color Correction Regions #5768

Open TechXavAL opened 4 years ago

TechXavAL commented 4 years ago

In the Color Toning tool, when you select the Color Correction Regions appears a graph theoretically showing a plot of all the colors in Lab space, located according to their a (horizontal axis) and b (vertical axis) coordinates.

That graph is what helps you choose the appropriate color, but honestly, it is far from useful when all the colors are pastel tones, and there's even no yellow there.

I know it's quite difficult (if possible at all) creating a 2D graph that plots all the colors of a 3D color space, but anyway I think that graph could be better.

I have created a new graph, not accurate regarding where the colors should be plotted, but at least I think it's much better from an end user point of view: it's far more instinctive choosing the color you need here

cielab_8x8

These colors are far more saturated than mathematically they have to be, but again, ti should be easier to choose the appropriate color.

If you think this is of any help, I can upload a matrix (in a text file) with the RGB colors of each square.

Thanatomanic commented 4 years ago

Since the grid is generated on the fly, it is more difficult to produce exactly what you are proposing. That requires some function to describes how the luminance changes when moving along the axes (now it is simply constant).

It is much easier to intensify the colors. How about this? image (left original, right modified)

TechXavAL commented 4 years ago

It looks better, but I started with the custom graph because there's no yellow color in the generated plot. And from a user point of view, that's confusing. The fact is that I can select the yellow color by picking a point around the 4th column, near the top, but I've found that by playing with it (trying to locate the yellow patch with a test image), not straight away.

I know nothing about the underlying algorithm, as you probably have guessed, but wouldn't be possible just pointing to a matrix o triplets that will give the needed colors?

E.g:

This is the full set of triplets, just in case CIELab-chart.csv.txt

My chart is not mathematically correct, as I think there's no way to show the yellow patch with an algorithm (it's too saturated). That's why I have pushed it a bit in the saturation side, knowing that the resulting patches won't be true anymore.

If what I'm proposing is not possible, then at least your new version is better, of course.

And by the way, my graph comes from this image: greta2 that I believe is a good distribution of the CIELab color space if we agree that these Wikimedia plots are reasonably accurate: https://upload.wikimedia.org/wikipedia/commons/0/06/CIELAB_color_space_top_view.png https://upload.wikimedia.org/wikipedia/commons/7/7d/CIELAB_color_space_front_view.png :

Thanatomanic commented 4 years ago

A matrix of values would certainly be possible, but it would also be less true to the 'real deal' of showing correctly calculated a b values in the grid. Maybe you've already tried, but if you use the grid on a monochrome or mostly grey area, you actually get a quite good color match with the selected area in the grid. There is some benefit there as well. Here's a video: https://filebin.net/cpdorsx4s51glx6m

Maybe @agriggio who made the tool had some thoughts behind his choice for the grid.

TechXavAL commented 4 years ago

Thanks for your video. I didn't even thought about checking it that way! :sweat:

I don't want to be stubborn, but in your video and to my eyes there's no correlation between the color shown in preview with default values (Saturation=0, Slope=1.000) and the color chosen in the plot. Sorry.

There's one big difference, though: in my version the lower right square is bluish, while in the tool the result is definitely pinkish.

And the problem I explained remains: at second 32 the preview clearly shows a yellow color (gold yellow, if you prefer), that has absolutely nothing to do with the color set in the tool. That was the main problem I saw with the current background graph.

Anyway, if you think it will be useful, I could generate a new proposal, with the colors already selected by the tool in the center of each square, with default settings. At least that won't be misleading. I'm not talking about changing the color selection algorithm, just the background that serves as a guide.

If not, well, I've tried at least.

Desmis commented 4 years ago

@Thanatomanic @TechXavAL It seems to me, it will be a nice improvment. This "graph" is used in many tools (wavelet, Local adjustments, color toning...)

jacques

TechXavAL commented 4 years ago

I have finally found time to edit my custom graph, with «real» hues.

This is what I've done:

It's puzzling how the colors look different depending on the surroundings: if I applied the exact same color in GIMP, it looked exactly the same when the color patch was zoomed in to fill the screen (as expected), but when zoomed out and surrounded with the other patches, colors had a strong tendency to look much darker. Sometimes even the hue was a bit off. So I've had to tweak them so they looked «good» to my eye when the image was zoomed at 100%.

So those are NOT accurate colors as read by a color picker, but will be accurate when looked within the whole set of color patches. Or at least that is the goal.

cielab_8x8_real

Now we can locate yellows and almost any other color, at the expense of not including the deepest blues. But anyway, that's mostly how it looks in RT with those settings.

Of course, if you point the tool to any other place that is not the center of each square, the color will not be the same, but will be around it: if the center of the square is magenta, don't expect a red color within the same square.