Code:
R := GetRValue (
RGB) / 255;
G := GetGValue (
RGB) / 255;
B := GetBValue (
RGB) / 255;
^^^ Byte := ^^^ Float
Doesn't the compiler tell you exactly what's wrong?
On the right you have a float (Extended) and you want to assign that to an integer (byte) on the left, which of course cannot work.
Why are you dividing there at all?
Also, the compiler should tell you that these lines are wrong (useless).
If you change a little thing, you will quickly realize that the value is only output, but not input (InOut).
Delphi-Quellcode:
//procedure RGB2HSVRange(RGB: TColor; var H: Word; var S, V: Byte);
procedure RGB2HSVRange(
RGB: TColor;
out H: Word;
out S, V: Byte);