File: HSL.xml

package info (click to toggle)
openclonk 8.1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 169,520 kB
  • sloc: cpp: 180,479; ansic: 108,988; xml: 31,371; python: 1,223; php: 767; makefile: 145; sh: 101; javascript: 34
file content (48 lines) | stat: -rw-r--r-- 1,649 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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>HSL</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>
      </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>
        <code><funclink>GetHiRank</funclink>(0)-&gt;<funclink>SetColor</funclink>(HSL(<funclink>Random</funclink>(256),255,127));</code>
        <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>