ColorToHSL

From SCAR Divi Manual
Revision as of 11:07, 5 July 2011 by Freddy (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

procedure ColorToHSL(C: Integer; var H, S, L: Extended);

Availability

SCAR Divi 3.00 > Current

Description

Converts a given color value C to HSL values and returns them in H, S and L. The components can be joined back together into a color value using HSLToColor.

Example

var
  h, s, l: Extended;

begin
  ColorToHSL(123456, h, s, l);
  WriteLn(FloatToStr(h) + ';' + FloatToStr(s) + ';' + FloatToStr(l));
end.

Output:

28,6666661500931;99,1189420223236;44,5098042488098

See Also