XYZToHSL

From SCAR Divi Manual
Revision as of 18:28, 5 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> procedure XYZToHSL(X, Y, Z: Extended; var H, S, L: Extended); </source> ==Availability== SCAR Divi 3.00 > Current ==Descriptio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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