openclonk/docs/sdk/script/fn/HSLa.xml

50 lines
1.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
<func>
<title>HSLa</title>
<category>Arithmetics</category>
<version>5.1 OC</version>
<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>
<desc>Brightness of the color. A brightness of 0 would correspond to <funclink>RGB</funclink>(0,0,0).</desc>
</param>
<param>
<type>int</type>
<name>byA</name>
<desc>Opacity of the color.</desc>
</param>
</params>
</syntax>
<desc>Creates a 32 bit color value from four parameters. Range is 0-255 for all parameters.</desc>
<examples>
<example>
<code><funclink>SetClrModulation</funclink>(HSLa(128,255,128,40));</code>
<text>Colors this object in a somewhat transparent and spooky green.</text>
</example>
</examples>
<related>
<funclink>RGB</funclink>
<funclink>RGBa</funclink>
<funclink>HSLa</funclink>
</related>
</func>
<author>Newton</author><date>2005-06</date>
</funcs>