HSL
Category:
Arithmetics
Since engine version:
5.1 OC
Description
Creates a 32 bit color value from three parameters. Range is 0-255 for all parameters.
Syntax
int
HSL(
int
byH,
int
byS,
int
byL);
Parameters
byH:
Hue of the color. 0 is red, 85 is green, 170 is blue, and 255 is red again.
byS:
Saturation of the color. This is the color contrast.
byL:
Brightness of the color. A brightness of 0 would correspond to
RGB
(0,0,0).
Examples
SetSkyAdjust
(HSL(0,255,127));
Makes a ruddy sky.
GetHiRank
(0)->
SetColor
(HSL(
Random
(256),255,127));
Colors the highest ranking clonk of the first player in a strong, random color.
See also:
HSLa
,
RGB
,
RGBa
Newton, 2005-06