2010-08-22 13:13:17 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
|
<!DOCTYPE funcs
|
|
|
|
SYSTEM '../../../clonk.dtd'>
|
2009-05-09 13:11:51 +00:00
|
|
|
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
|
|
|
|
<funcs>
|
2010-08-22 13:13:17 +00:00
|
|
|
<func>
|
|
|
|
<title>HSL</title>
|
|
|
|
<category>Arithmetics</category>
|
2011-06-30 10:52:55 +00:00
|
|
|
<version>5.1 OC</version>
|
2010-08-22 13:13:17 +00:00
|
|
|
<syntax>
|
|
|
|
<rtype>int</rtype>
|
|
|
|
<params>
|
|
|
|
<param>
|
|
|
|
<type>int</type>
|
|
|
|
<name>byH</name>
|
|
|
|
<desc>Hue of the color. 0 is red, 85 is green, 170 is blue, and 255 is red again.</desc>
|
|
|
|
</param>
|
|
|
|
<param>
|
|
|
|
<type>int</type>
|
|
|
|
<name>byS</name>
|
|
|
|
<desc>Saturation of the color. This is the color contrast.</desc>
|
|
|
|
</param>
|
|
|
|
<param>
|
|
|
|
<type>int</type>
|
|
|
|
<name>byL</name>
|
2011-07-30 23:32:02 +00:00
|
|
|
<desc>Brightness of the color. A brightness of 0 would correspond to <funclink>RGB</funclink>(0,0,0).</desc>
|
2010-08-22 13:13:17 +00:00
|
|
|
</param>
|
|
|
|
</params>
|
|
|
|
</syntax>
|
|
|
|
<desc>Creates a 32 bit color value from three parameters. Range is 0-255 for all parameters.</desc>
|
|
|
|
<examples>
|
|
|
|
<example>
|
|
|
|
<code><funclink>SetSkyAdjust</funclink>(HSL(0,255,127));</code>
|
|
|
|
<text>Makes a ruddy sky.</text>
|
|
|
|
</example>
|
|
|
|
<example>
|
2011-07-17 17:41:48 +00:00
|
|
|
<code><funclink>GetHiRank</funclink>(0)-><funclink>SetColor</funclink>(HSL(<funclink>Random</funclink>(256),255,127));</code>
|
2010-08-22 13:13:17 +00:00
|
|
|
<text>Colors the highest ranking clonk of the first player in a strong, random color.</text>
|
|
|
|
</example>
|
|
|
|
</examples>
|
|
|
|
<related>
|
|
|
|
<funclink>RGB</funclink>
|
|
|
|
<funclink>RGBa</funclink>
|
|
|
|
<funclink>HSLa</funclink>
|
|
|
|
</related>
|
|
|
|
</func>
|
|
|
|
<author>Newton</author><date>2005-06</date>
|
|
|
|
</funcs>
|