Einzelnen Beitrag anzeigen

Benutzerbild von Sinspin
Sinspin

Registriert seit: 15. Sep 2008
Ort: Dubai
618 Beiträge
 
Delphi 10.3 Rio
 
#4

AW: Problem mit verschiedenen Typen im RGB-to-HSL-Range Procedur

  Alt 5. Jul 2022, 07:16
I had a few month ago the same thoughts in my mind, why not using this implementation or why not that.
Result is, i use now a version which is as close as possible to the original, since i need to convert both way.

The Single/Float values are confusing at the beginning. But they have an nice advantage, you get much smoother values than you would get with integer!
So, you should keep Single values, if you need to display them, you need to quantize the values.
For example for S with 100, for percent style Saturation. Or at least 360 for the color angle H-Hue, but 360 is by far not enough values for perfect color representation!
Stefan
Nur die Besten sterben jung
A constant is a constant until it change.
  Mit Zitat antworten Zitat