Lightness adjustment in HSL Dialog

Corel Paint Shop Pro

Moderator: Kathy_9

migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Lightness adjustment in HSL Dialog

Post by migf1 »

Hello,

I'd like to ask if anyone knows why PaintShop Pro behaves totally different compared to Photoshop and Affinity Photo when it comes to Lightness adjustments via the HSL Dialog.

I'm trying to remove the lightness completely from the Blues and while Ps and AF both give the same results, PSP gives something totally different and quite frankly very ugly. Let me show some screenshots where I am trying the exact same thing in these 3 different programs:

1. Photoshop
2. Affinity Photo
3. PaintShop Pro

PS. The image used is royalty free, available on Pexels (follow the link to D/L it)
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

The real question is why do Photoshop and Affinity Photo work like that?

PSP is literally setting the lightness value to 0 or so depending on the color and its fall-off value. Any every equation I know of to convert HSL to RGB if you put the lightness at 0 it comes out black. Making PSP's more what I would expect.

In Photoshop if I create a continuous sample point and set it to HSB, Setting the lightness down to -100 takes the brightness from 84% down to 60%. And saturaiton goes from 34% to 8%. Why would lightness change the saturation more than the actual brightness of the values?
https://levifiction.wordpress.com/
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Lightness adjustment in HSL Dialog

Post by Jean-Luc »

What bothers me are the pixel blocks that appear.
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

My guess is that's the JPG artifacting.

The end result of setting lightness to -100 is a lot of these pixels are so similar and not fully tonally different that they come out to being almost equal in color, in blocks like that.
https://levifiction.wordpress.com/
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Lightness adjustment in HSL Dialog

Post by migf1 »

Thank you all for the replies!

Yesterday I was too tired, so today I just did some research on the matter. I think I found what causes such a drastic difference. Seems like Ps, AF (and Gimp as I found out today) allow setting the fall-off tolerance, meaning the transition smoothness between the chosen color and its similar colors. Put otherwise, they work on color ranges based on the chosen color, instead of targeting just that 1 color (Blue in our case).

In Ps, the color range is controlled via an extra slider at the bottom of the dialog, with adjustable vertical and triangle handles inside it. Here is what Ps docs say about this: https://adobe.ly/2wvohsc
Indeed, I just tried narrowing down the fall-off range, and the result came out quite pixelated too:
Default Settings: https://prnt.sc/rvlscl
Narrowed range: https://prnt.sc/rvvasc
However, seems like it always retains a minimum fall-off range around the chosen color (Blues), so it never goes totally black as it does in PSP (or I didn't find a way to reproduce PSP results in Ps via HS adjustment)

Gimp 2.10.18 also has a fall-off range slider inside its HSL dialog, but it is less refined and much simpler. It calls it Overall, and here is what their docs say about their HSL adjustment: https://docs.gimp.org/2.10/en_US/gimp-t ... ation.html
However, Gimp gives each own results, which are different from any of the other 3 programs:
Default Settings: http://prntscr.com/rvvmhw
Maxed Overlap: http://prntscr.com/rvvmtj
Once again, I didn't manage to reproduce PSP's results (seems like Gimp also retains a minimum fall-off range even with max overlap)

In Affinity Photo I haven't found a way to adjust the fall-off range, but it seems to default to Ps's default settings.

So, I guess I should add an HSL fall-off range adjustment in my PSP 2021 wish list (LOL)
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

I don't think that's it.

PSP also has this. And its start and end points for the main selection and fall-offs match Photoshop's. Though they are represented by lines not triangles and they can be moved to increase or decrease the fall off. When you select Blues from the drop down you see this in-between the inner and outer circles. Here's a quote from the help files.
If you choose to edit a color range, you can use the control ring that appears between the inner and outer color rings to modify the range to be edited. To change the range width, drag the two outer points on the control ring. To change the area in which the adjustment builds to full effect, drag the two inner bars (the full effect will be applied between the bars). To move the adjustment area, drag the white circles.
https://levifiction.wordpress.com/
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Lightness adjustment in HSL Dialog

Post by migf1 »

LeviFiction wrote:That's not it.

PSP also has this. And its start and end points for the main selection and fall-offs match Photoshop's. Though they are represented by lines not triangles and they can be moved to increase or decrease the fall off. When you select Blues from the drop down you see this in-between the inner and outer circles. Here's a quote from the help files.
If you choose to edit a color range, you can use the control ring that appears between the inner and outer color rings to modify the range to be edited. To change the range width, drag the two outer points on the control ring. To change the area in which the adjustment builds to full effect, drag the two inner bars (the full effect will be applied between the bars). To move the adjustment area, drag the white circles.
Oh, I never knew that! Thank you for pointing out!

So, since we do have this control in PSP too, now I am more curious to find out why we get such different results. I just noticed that Ps default settings specify Blue's right limits to 255/285 degrees in the fall-off slider (and to 195/225 for the left limits) .... PSP default settings have the same left limits, but the right limits are reversed: 285/255... I thought maybe that's causing the different results between the 2 programs. However I don't seem to be able to make them 255/285 in PSP. Is that of any help in trying to figure out what is going on here?

Thanks.
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

It's just a different way of presenting the numbers. They are the same in both PSP and Photoshop even though they are written differently.

I'm not going to describe this well, but essentially these numbers act like they are moving in toward the center. Each pair of numbers starts at the outside and works inward. So the first number in each pair is the start of the selection. The second number is the start of the full effect range.

If you were to re-write them linearly, starting point to ending point, they would ready 195 (outside) / 225 (inside) 255 (inside) / 285 (outside). But since both ends start on the outside and move inward it's written 195 (outside) / 225(inside) 285 (outside) / 255 (inside)

So yeah, very long winded way of saying. They look odd but are exactly the same as what Photoshop has.
https://levifiction.wordpress.com/
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Lightness adjustment in HSL Dialog

Post by migf1 »

I see, thanks for the reply!

To me they look like simple rotation degrees of the color wheel, but counting counter-clockwise (in geometry we count them clockwise).

In any case, I'm still wondering why we get such different results even though the numbers are the same. I do understand that 0 luminosity for any color should give total black, but apparently that image does not have a pure Blue in it (aka #0000ff) and I think that's probably the reason why both Ps and AF do not produce totally black areas when removing the Blues luminosity.

I verified that there is no pure blue in the image, by overlaying it with a #0000ff layer and set it to Difference blend mode. There are indeed no pure black areas in the result: https://prnt.sc/rw0i0m
Doing the same thing in Ps gives the exact same result. I brought it into PSP for direct comparison, and they are exactly the same: https://bit.ly/2Rj4Euz

So far so good, but things go cookoo when removing Blues luminosity via the HSL adjustment:
PSP: https://prnt.sc/rw0vjm
Ps: http://prntscr.com/rw0whq

PSP looses so many details from the blue-ish areas (shown as total or almost total black above). Plus I don't understand why it screws up the sky sooooo much in the end-result, while it shows it just fine when the intermediate blue layer is active: https://bit.ly/2XnFfUq

It makes me think the HSL Luminosity slider must be flawed or something, and I really hope Corel does something about it.
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Lightness adjustment in HSL Dialog

Post by Jean-Luc »

LeviFiction wrote:My guess is that's the JPG artifacting.
You are right about the JPG artifacts.

I created a test image from scratch:
rainbow.png
HSL Luminosity -100 applied:
rainbow initial.jpg
Saving in JPG at Compression 40, closed, open again and HSL -100 applied. Blocks appear:
rainbow 40.jpg
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

Remember HSL uses hue. Any hue between 225 and 255 are the targeted blues. With fall offs at 195 and 285. The non-pure blues still fall into this hue range just fine. It's why the sky is targeted at all. If you set your eye dropper to show HSL you can see that.

It's the math. PSP and Photoshop are doing different things using the same selection criteria. Photoshop adjusts saturation while PSP doesn't. Or at least not to the same degree.
https://levifiction.wordpress.com/
TimW
Posts: 156
Joined: Fri Feb 05, 2016 7:53 pm
operating_system: Windows 7 Home Premium
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS M5A99FX
processor: AMD FX8350 8 core 4.0GHZ
ram: 16GB
Video Card: AMD Radeon HD 6900 Series
sound_card: On Board
Hard_Drive_Capacity: 256GB SSD
Monitor/Display Make & Model: Dell UltraSharp U2412M 24"
Corel programs: PSP X8, Knockout 2

Re: Lightness adjustment in HSL Dialog

Post by TimW »

LeviFiction wrote:It's the math. PSP and Photoshop are doing different things using the same selection criteria. Photoshop adjusts saturation while PSP doesn't. Or at least not to the same degree.
Please forgive my simplistic understanding of the HSL control, especially the Saturation & Lightness. PSP does exactly what those adjustments say it does. Saturation reduces or increases the saturation of the selected color range while Lightness merely makes it darker or lighter. I find it odd that Photoshop will adjust ± the saturation with the Light/darkness control as shown in some of the PS examples. In those same examples, the Saturation control was left at 0. Just my thoughts for what they're worth.
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Lightness adjustment in HSL Dialog

Post by migf1 »

Yeah, they obviously do different things, I'm just trying to figure out what and why.

I just noticed that the Ps color-wheel uses HSB not HSL, and according to wikipedia B and L are not exactly the same thing.
HSV and HSL
Main article: HSL and HSV

HSV and HSL are transformations of Cartesian RGB primaries (usually sRGB), and their components and colorimetry are relative to the colorspace from which they are derived. HSV (hue, saturation, value), also known as HSB (hue, saturation, brightness), is often used by artists because it is often more natural to think about a color in terms of hue and saturation than in terms of additive or subtractive color components. HSL (hue, saturation, lightness or luminance), also known as HSI (hue, saturation, intensity) or HSD (hue, saturation, darkness), is quite similar to HSV, with "lightness" replacing "brightness". The difference is that a perfectly light color in HSL is pure white; but a perfectly bright color in HSV is analogous to shining a white light on a colored object. I.e. shining a bright white light on a red object causes the object to still appear red, just brighter and more intense. Shining a dim light on a red object causes the object to appear dark and less bright.
I don't understand more than half of what the 2nd link (inside the quote) says, but from what I understand from the text I quoted above, it does seem like HSB never goes totally black or totally white.

However, I cannot reproduce Ps changing the saturation when I remove the lightness of any color. I tested with a color wheel of pure colors, and no matter which color I removed the lightness from via the Ps HS adjustment, the hue and saturation stay the same in the adjacent, affected colors. I'm attaching the color-wheel in case anyone else wants to give it a try too.

-- UPDATE -------------------
I re-uploaded the image, it now has the correct RGB and HSL codes for the yellow swatch
my-colors-2.png
PS. About the jpg artifacts, I still don't get why Ps and AF have no issues with the very same image. Please don't get me wrong, I am not bashing PSP, it is my prefered image editor since its Jasc days (though I still find new things). I am just trying to see how we can improve our work with it.
Last edited by migf1 on Fri Apr 10, 2020 10:52 am, edited 1 time in total.
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Lightness adjustment in HSL Dialog

Post by LeviFiction »

Alright, so really quick comparisons. When PSP and Photoshop are set to Master they act identically. That is they are essentially either adding white or black depending on which way the slider is moved. For example, if I take a black layer and set it to 50% opacity, it's the same as using the Hue/Saturation/Lightness adjustment layer and setting the lightness value to -50. This is true in PSP, Photoshop, Paint.Net, etc.

It's only when targeting colors that things go wonky. Photoshop seems to take original brightness into account when editing on targeted colors. PSP seems to overwrite the lightness.

Take your color wheel image for example. In Photoshop if you target the blue colors and set the lightness at -100, then pure blue will be set to zero. As will saturation. Even though saturation doesn't need to be touched in either HSB or HSL when adding black. HSL and HSB are only different where white is concerned. To get White in HSB you need saturation to be at zero. Otherwise it's just the purest form of the color. Your pure blue has a saturation of 100% and a Brightness of 100% in HSB.

Both Photoshop and PSP will set these pure colors to black, and will set their adjacent colors to 50% as they fall half-way in the fall-off area of the selection.

But the big difference is the areas outside the circles. In PSP even the whitest pixel will be turned black if its hue is within the main selected range. While in Photoshop that same pixel will remain white.

Take a look at pixel 175x547. In Photoshop it will lose its Hue but saturation was already non-existant and brightness only goes down by a single percentage point. In PSP this is set to black because the hue 240 is fully selected, and -100% lightness is zero. At this point Photoshop is no longer just adding black or white to the image. It looks like it's ignoring pixels without color (Saturation set close to zero) maintaining their brightness.
https://levifiction.wordpress.com/
migf1
Posts: 510
Joined: Fri Apr 03, 2020 3:09 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit

Re: Lightness adjustment in HSL Dialog

Post by migf1 »

Levi, thank you very much for the detailed explanation!

I have a little trouble getting the HSL readings in PSP...
LeviFiction wrote: ...
It's only when targeting colors that things go wonky. Photoshop seems to take original brightness into account when editing on targeted colors. PSP seems to overwrite the lightness.

Take your color wheel image for example. In Photoshop if you target the blue colors and set the lightness at -100, then pure blue will be set to zero. As will saturation. Even though saturation doesn't need to be touched in either HSB or HSL when adding black.
I can confirm this with Ps Info panel which shows Before & After, so as you say pure blue HSB goes from 240,100,100 to 0,0,0:
https://gyazo.com/03cc601de54084680e93024ba257f9e4

But how can I check the same thing is PSP? I'm not aware of a corresponding Info panel (the one I know in PSP shows only RGB), so I merged the HSL adjustment with the image as a new layer and tried the eyedropper on all 3 layers with "Use all layers" unchecked.

I don't know if that's accurate though, because the "after" readings show modified hue and saturation :
https://gyazo.com/7566cce10413bf60d9aa5ac6431dc7d6
Initial HSL: 240,255,127
Merged HSL: 232,0,0
HSL Adjustment layer: 232,0,255 (this is most probably irrelevant)

If I got you right, PSP is supposed to touch neither the hue nor the saturation, so apparently that's not a right way to test in this case?
...
Both Photoshop and PSP will set these pure colors to black, and will set their adjacent colors to 50% as they fall half-way in the fall-off area of the selection.
...
Yeah, I can confirm that too for the adjacent colors, both in Ps and in PSP (using the merged layer, mentioned above).
Ps: https://gyazo.com/30f1999449524d5587630862a93d8cb9
PSP: https://gyazo.com/1e61abacdb639e9f99605414d61a6611
Both programs drop the Brightness/Lightness to roughly 50%/64. Note though that Ps retains the same Hue and Saturation for these colors, while PSP seems to slightly alter them but it's negligible. So it looks like Ps messes with the hue & sat of the absolutely targeted color only, and not the remaining ones in the specified fall-off range?
...
But the big difference is the areas outside the circles. In PSP even the whitest pixel will be turned black if its hue is within the main selected range.While in Photoshop that same pixel will remain white.

Take a look at pixel 175x547. In Photoshop it will lose its Hue but saturation was already non-existant and brightness only goes down by a single percentage point. In PSP this is set to black because the hue 240 is fully selected, and -100% lightness is zero. At this point Photoshop is no longer just adding black or white to the image. It looks like it's ignoring pixels without color (Saturation set close to zero) maintaining their brightness.
I apologize, but I replaced the color-wheel image in my previous post before reading your reply, so the 175,547 pixel is not relevant anymore. If you are so kind, would you please point me to that pixel in the new image, so I can follow your text? Thanks!

PS. In a nutshell, is there an easy way to replace Ps workflow involving brightness removal from certain colors, with something that gives the same or similar results in PSP?
Good Unofficial PaintShop Pro Tutorials: Creation CasselMake Shop ProHEC Image EditingLeviFiction PSP Basics
(plus my own Gimp & Stuff)
Post Reply