Fill random docs

This commit is contained in:
kobewi
2022-10-06 21:59:48 +02:00
parent 0c23a2cfe3
commit 1b7aee3c8d
18 changed files with 104 additions and 4 deletions

View File

@ -145,6 +145,11 @@
<return type="int" />
<param index="0" name="name" type="String" />
<description>
Returns the index of a named color. Use [method get_named_color] to get the actual color.
[codeblock]
var idx = Color.find_named_color("khaki")
modulate = Color.get_named_color(idx)
[/codeblock]
</description>
</method>
<method name="from_hsv" qualifiers="static">
@ -187,6 +192,7 @@
<return type="Color" />
<param index="0" name="rgbe" type="int" />
<description>
Encodes a [Color] from a RGBE9995 format integer. See [constant Image.FORMAT_RGBE9995].
</description>
</method>
<method name="from_string" qualifiers="static">
@ -194,6 +200,7 @@
<param index="0" name="str" type="String" />
<param index="1" name="default" type="Color" />
<description>
Creates a [Color] from string, which can be either a HTML color code or a named color. Fallbacks to [param default] if the string does not denote any valid color.
</description>
</method>
<method name="get_luminance" qualifiers="const">
@ -208,29 +215,37 @@
<return type="Color" />
<param index="0" name="idx" type="int" />
<description>
Returns a named color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count].
</description>
</method>
<method name="get_named_color_count" qualifiers="static">
<return type="int" />
<description>
Returns the number of available named colors.
</description>
</method>
<method name="get_named_color_name" qualifiers="static">
<return type="String" />
<param index="0" name="idx" type="int" />
<description>
Returns the name of a color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count].
</description>
</method>
<method name="hex" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
Returns the [Color] associated with the provided integer number, with 8 bits per channel in ARGB order. The integer should be 32-bit. Best used with hexadecimal notation.
[codeblock]
modulate = Color.hex(0xffff0000) # red
[/codeblock]
</description>
</method>
<method name="hex64" qualifiers="static">
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
Same as [method hex], but takes 64-bit integer and the color uses 16 bits per channel.
</description>
</method>
<method name="html" qualifiers="static">