Merge pull request #93218 from thmasn/color-documentation

Mention inverse of hex functions in `Color`
This commit is contained in:
Rémi Verschelde 2024-06-17 10:59:03 +02:00
commit f6bd88090d
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -203,7 +203,7 @@
<return type="Color" /> <return type="Color" />
<param index="0" name="hex" type="int" /> <param index="0" name="hex" type="int" />
<description> <description>
Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel). Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of [method to_rgba32].
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRGGBBAA"[/code]). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRGGBBAA"[/code]).
[codeblocks] [codeblocks]
[gdscript] [gdscript]
@ -223,7 +223,7 @@
<return type="Color" /> <return type="Color" />
<param index="0" name="hex" type="int" /> <param index="0" name="hex" type="int" />
<description> <description>
Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel). Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of [method to_rgba64].
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRRRGGGGBBBBAAAA"[/code]). In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRRRGGGGBBBBAAAA"[/code]).
</description> </description>
</method> </method>
@ -441,7 +441,7 @@
<method name="to_rgba32" qualifiers="const"> <method name="to_rgba32" qualifiers="const">
<return type="int" /> <return type="int" />
<description> <description>
Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. This method is the inverse of [method hex].
[codeblocks] [codeblocks]
[gdscript] [gdscript]
var color = Color(1, 0.5, 0.2) var color = Color(1, 0.5, 0.2)
@ -457,7 +457,7 @@
<method name="to_rgba64" qualifiers="const"> <method name="to_rgba64" qualifiers="const">
<return type="int" /> <return type="int" />
<description> <description>
Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. This method is the inverse of [method hex64].
[codeblocks] [codeblocks]
[gdscript] [gdscript]
var color = Color(1, 0.5, 0.2) var color = Color(1, 0.5, 0.2)