Difference between revisions of "HSLToRGB"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure HSLToRGB(H, S, L: Extended; var R, G, B: Integer); </source> ==Availability== SCAR Divi 3.00 > Current ==Description...")
 
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
  
 
==Description==
 
==Description==
Converts [http://en.wikipedia.org/wiki/HSL_and_HSV HSL] values specified by '''H''', '''S''' and '''L''' to a [http://en.wikipedia.org/wiki/RGB_color_model RGB] color values and returns them in '''R''', '''G''' and '''B'''. The result can be converted back to RGB values using [[RGBToHSL]].
+
Converts [http://en.wikipedia.org/wiki/HSL_and_HSV HSL] values specified by '''H''', '''S''' and '''L''' to [http://en.wikipedia.org/wiki/RGB_color_model RGB] color values and returns them in '''R''', '''G''' and '''B'''. The result can be converted back to HSL values using [[RGBToHSL]].
  
 
==Example==
 
==Example==

Latest revision as of 19:21, 5 July 2011

Definition

procedure HSLToRGB(H, S, L: Extended; var R, G, B: Integer);

Availability

SCAR Divi 3.00 > Current

Description

Converts HSL values specified by H, S and L to RGB color values and returns them in R, G and B. The result can be converted back to HSL values using RGBToHSL.

Example

var
  r, g, b: Integer;

begin
  HSLToRGB(25, 50, 75, r, g, b)
  WriteLn(IntToStr(r) + ';' + IntToStr(g) + ';' + IntToStr(b));
end.

Output:

191;223;159

See Also