Clarify doc for Color.hex and C# Color()

The "alpha channel first" seems misleading to me. It doesn't match with
the examples, so remove it. Add a more detailed specification of the
expected number format in hex.

(cherry picked from commit 779ac20bb9)
This commit is contained in:
mara
2023-05-30 12:59:35 +02:00
committed by Yuri Sizov
parent 484a39c34d
commit a44409bf54
2 changed files with 6 additions and 6 deletions

View File

@@ -203,8 +203,8 @@
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel, alpha channel first).
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix).
Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel).
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRGGBBAA"[/code]).
[codeblocks]
[gdscript]
var red = Color.hex(0xff0000ff)
@@ -223,8 +223,8 @@
<return type="Color" />
<param index="0" name="hex" type="int" />
<description>
Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel, alpha channel first).
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix).
Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel).
In GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]"0x"[/code] prefix, making it [code]"0xRRRRGGGGBBBBAAAA"[/code]).
</description>
</method>
<method name="html" qualifiers="static">