Jump to content
You must now use your email address to sign in [click for more info] ×

Color Picker BUG: curves adjustment, LAB mode, color picker picks wrong values


Recommended Posts

Hi there, when applying a curves adjustment and then choosing the LAB color space in the drop down menu in the curves adjustment panel, the color picker picks the wrong values.

OS: Windows 11
AP2: All versions (2.0 to 2.4.1)

This holds true with proper conversion (Document>Convert Format/ICC Profile) or quick conversion (i.e. using the LAB color space in the curves adjustment without prior proper conversion).

The image below show a greyscale ramp with nine stripes, i.e. the values of A/B channels for all the stripes are equal to 0. The Lightness value (L-channel) increases in steps of 12.5 from 0 to 100. You can verify this by looking at the info panel (bottom right) or by looking at the curves diagram: The A-channel shows only one peak in the middle (the value of 0, the range is from -128 to 127 where 0 represents neutral grey).

Just to clarify: The horizontal axis represents the input values (-128 to 127, i.e. green to red) of the A-channel, and the vertical axis represents  the output values of the A-channel. (When you are used to the RGB color model you might be thinking of shadows and highlights, but that is not what the axis are showing).

No matter where you put the color picker now, the color picker (if working properly) should create a point on the middle of the curve, since only grey values (i.e. A-value =0 everywhere) are present. But the color picker does something different, it picks a point on the curve based on lightness value (L-channel), which is wrong and moreover, it just does not make any sense.

LABCurvesadjustment2.thumb.png.563d5da9719423468a7f0773ae805681.png

For demonstration: E.g. in the above picture, I have put the color picker where the crosshairs of the info panel lies and the moved the curve down to add green in the picture. The color picker should have created a point on the middle of the curve, but it did not. Instead it created a point at the left of the peak (where I dragged down the curve). To keep the curve straight around the peak (the middle) I added three points around the peak to isolate the effect. Of course, nothing happens, they greyscale picture looks like before, because the change of the curve happens outside where the peak lies. There is no other color present than neutral grey. Don't confuse this with the RGB color model or even HSV or HSL. LAB strictly separates lightness (L-channel) from color (A- and B-channels). Thus, mapping any input value of the A-channel other than zero to any other value has no effect. Also don't be tempted to interpret the curve of the A-channel like: "It adds green in the shadows". That is not what the A-channel curve adjustment does. It maps input values of the A-channel (ranging from green to red, negative values greenish, positive values reddish) to output values of the A-channel.

So to add green, I moved the middle point of the curve down (not using the color picker). It adds green everywhere in the picture (see info panel A-value=-64), not only in the midtones. This curve says: Input A-value 0 is mapped to output A-value -64. Anything else stays where it was. Mapping 0 to -64 in the A-channel means mapping grey into a greenish tone. Since the whole picture had the same "grey color" (in the LAB color space!!) everywhere, the picture now is turned greenish everywhere. You can see this is the histogram in the top right corner which shows the A-channel: In the picture above the peak is in the middle (=grey), in the picture below the peak has moved to the left (=greenish).

LABcurves.thumb.jpg.7197f95413e07872b33abbe6130276c0.jpg

 

 I added the .afphoto file so that you can verify it yourself. This is a color picker bug and hopefully removed soon.

Color Picker Bug LAB Curves Adjustment.afphoto

Link to comment
Share on other sites

8 hours ago, stevenmiller said:

No matter where you put the color picker now, the color picker (if working properly) should create a point on the middle of the curve, since only grey values (i.e. A-value =0 everywhere) are present. But the color picker does something different, it picks a point on the curve based on lightness value (L-channel), which is wrong and moreover, it just does not make any sense.

As far as I know the picker from curves always chooses the lightness value (probably based on HCL or HSL color model) of the sampled pixel, it is not related to the selected color channel in curves.

Unfortunately documentation is sparse.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Second misconception:

LAB uses colors values from -100 to plus 100 in UI, but those are mapped to 0 to 1 internally as 16 bit values.

If you use the channels panel to show the actual La value of your gradient, it is uniformly 0.5. this is the reason that the whole image gets affected.

For clarity:

  • Color Panel UI will show a La of zero
  • internally (relevant for curve adjustment) the stored values is 0.5
  • if create a node at coordinate 0.5 / 0.5 and drag it to 0.5 / 0.0, La becomes -100, and affects the whole source gradient as it has only this value used.

 

IMG_1123.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

And if you want to limit the recoloring to a certain luminostity range, just use blend ranges or live mask / luminosity.

lab blend range.PNG

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

@NotMyFault That is exactly my point! The fact that the color picker does always picks points on the curve based on lightness values is true (I know), but that does not make it any better, and in case of the LAB mode the color picker's value picking is not of any practical use. That is why the the color picker should be modified for the LAB mode and why I call it a bug.

If you follow my example you get my point. Using the color picker in the above example for the AOp-channel, for each grey stripe the color picker will pick a different point on the curve (based on lightness values), but what the color picker should do: It should pick the middle point on the curve for the AOp/BOp-channel, no matter where you click on the greyscale picture. This is the only meaningful pick. Even James Ritson got confused about this behavior: In his tutorial about the LAB color model he mistakenly explained that picking a point on the left on the curve (he used the BOp-channel) and dragging it down will add blue to the shadows. But that is not what you do: You add blue everywhere in the picture (not only in the shadows), to be precise: Everywhere in the picture where the BOp-value is in the ballpark of the input value on the horizontal axis corresponding the to the picked point on the curve. This confusion is caused by the misleading "standard behaviour" of the color picker in LAB. The standard behavior just is not useful in LAB. That is my point.

No misconception on my side: I know how the curves works, by the way: LAB uses values from -128 to 127 for AOp/BOp channels and 0 to 100 for L-channel and maps them internally from 0.0 to 1.0. Technical term for this is Normalized Values. For clarity: In my example above I only refer to the Original LAB values - I assume these easy linear mapping can be done by everyone in his head; graphically in the curves diagram it just means putting the -128 on the left, the 0 in the middle, and the 127 on the right of the horizontal axis, similarly for the vertical axis - it seems that you did not notice that I was referring to the original values only.

Link to comment
Share on other sites

@NotMyFault The advice with the blend ranges/luminosity mask is quite useful - thanks for that. That addresses how to target specific tonal ranges.

However, the color picker in LAB is not useful for color manipulation in AOp/BOp-channel. If Affinity would change the standard behavioiur of the color picker in LAB to pick the point on the curve based on the value of the channel that you have chosen (e.g. in AOp-channel it should be based on the AOp-values not on L-values), then the color picker would have some practical use as you would be able to target a "color" and shift that color to another desired color (of course restricted to the available colors is that channel: for AOp-channel that would only be colors ranging from green to red).

Otherwise: What is the use of the color picker in LAB for the AOp/BOp-channel?

Link to comment
Share on other sites

Thanks for the additional information.

Your example is a bit too complex to make a point. Affinity repetedly said that the current behavior is "by design". So a bug report will be ignored. Instead, you may raise a feature request or even better add your vote to one of the existing.

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

17 minutes ago, stevenmiller said:

Otherwise: What is the use of the color picker in LAB for the AOp/BOp-channel?

The picker picks a lightness value, nothing else. It is the same in any color format RGB, LAB, CMYK, GREY. You can use it for this specic function.

If you want to limit the impact of an adjustment, use the blend range or live mask functionality instead.

In case you want to pick a different channel, as workaround use the info panel (or the color panel and the picker there, but beware of the details like 1x1 or 3x3 area averanging depending on platform Desktop / iPad) to measure the wanted value. Then make a random node and use the numeric input for the node position to get it where you really need it.

I know that is not as you wat or expect it to be, but it makes no sense insisting this is a bug. The decision is up to Affinity (i'm a regular user).

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thx for the hint, I supported your request for adding an additional option (so it seems you ran into the exact same issue a few months ago...).

Good advice, thx, that workaround is a good way to cope with the missing color picker option for adjustments!

The good thing about your workarounds is they work in any setting: With blend ranges/luminosity mask you can always target specific luminosity ranges and with your other workaround you can always target specific colors - very useful tips!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.