HSL does not Match !!! ... yes it is an old question but ...

Corel Paint Shop Pro

Moderator: Kathy_9

Post Reply
ilgk48
Posts: 63
Joined: Sun Apr 28, 2019 12:26 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: PaintShop PRO 2019 32bit

HSL does not Match !!! ... yes it is an old question but ...

Post by ilgk48 »

... repetita juvant :-)

Hi to all,
I found a related topic while was trying to clarify to me a question that is making me crazy.
Well.
Let take RGB(253,255,230).
Using a Web online converter it corresponds to HSL(65,100,95).
Now, in PSP 2019, switching the color display to HSL I see:
46,255,242 in the status bar
46,255,243 in the palette material
Practically the same, even if Corel deserves an ear-pull for the difference 242, 243: not exactly the same formula for calcultating :-) or displaying the result? Not professional.

But this is not the question.
46,255,242 are most probably the traslation of HSL(65,100,95) on a scale of 255,255,255 (...which is the utility of this?).

What I really do not understand is why cruising with the eye dropper i see 65,228,242 !!!
In this horrible mix H 65 is correct and L 242 is 95 scaled on 255; but S 228 ???
Please, what a mystic transformation is applied for obtaining Saturation 228 from Saturation 100?
And what's the need for displaying so with the eye dropper?

Thank you.
Paolo
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: HSL does not Match !!! ... yes it is an old question but ...

Post by LeviFiction »

There is still a lot of legacy code in PSP. When it was first created they did HSL scale of 255,255,255. You can see this in the Colorize command where the maximum hue is 255. The UI display (when set to use HSL in the general preferences) appears to use this legacy format. Whereas the new features built into the eye-dropper tool and the materials palette use a newer equation that is more standardized. Yes, they do need to clean this up and bring it into alignment.

I think this might just be a slight bug in the new HSL calculation. If I set the RGB values and then switch to HSL I get 228 Saturation. However, if I set the saturation in HSL sliders to 255 the end result is a saturation of 237. You'd have to ask Corel.

I would like to note that for me, if I have the legacy format turned on then saturation always shows 255 in the status bar and hovering over the materials palette swatch. It's only the sliders and eyedropper that show the oddball saturation. It's also possible this is just a different formula and it's perfectly accurate.
https://levifiction.wordpress.com/
ilgk48
Posts: 63
Joined: Sun Apr 28, 2019 12:26 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
Corel programs: PaintShop PRO 2019 32bit

Re: HSL does not Match !!! ... yes it is an old question but ...

Post by ilgk48 »

I think this might just be a slight bug in the new HSL calculation. If I set the RGB values and then switch to HSL I get 228 Saturation. However, if I set the saturation in HSL sliders to 255 the end result is a saturation of 237. You'd have to ask Corel.
Yes, and after setting the saturation to 255, returning to RGB this becomes (253,255,229)! Switching to HSL again the result is (65,237,242), as you said.
Re-forcing Saturation to 255, RGB is (253,255,229). Returning to HSL the result is (65,237,242) despite the previous forcing at 255 of Saturation.
So with the sliders:
RGB(253,255,230) ---> produces HSL(65,228,242) that forced to (65,255,242) ---> produces RGB(253,255,229) that---> produces HSL(65,237,242) that forced to (65,255,242) ---> produces RGB(253,255,229).

There is a sort of quantistic beahaviour :P :) :D :)

Only Corel can to know ...

PS. If you use sliders for converting a grey from RGB to HSL, for H you obtain always 232. Why not 0?.
Post Reply