XYZToHSL

From SCAR Divi Manual
Jump to: navigation, search

Definition

procedure XYZToHSL(X, Y, Z: Extended; var H, S, L: Extended);

Availability

SCAR Divi 3.00 > Current

Description

Converts XYZ values specified by X, Y and Z to HSL color values and returns them in H, S and L. The result can be converted back to XYZ values using HSLToXYZ.

Example

var
  h, s, l: Extended;

begin
  XYZToHSL(25, 50, 75, h, s, l)
  WriteLn(FloatToStr(h) + ';' + FloatToStr(s) + ';' + FloatToStr(l));
end.

Output:

48,1981992721558;35,9223306179047;79,8039197921753

See Also