Skip to content

Commit 6d46399

Browse files
committed
Merge pull request #94879 from KoBeWi/color_conjuring_tricks
Document alternatives to some static Color methods
2 parents 4f2d818 + 7cc0df6 commit 6d46399

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/classes/Color.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
<param index="1" name="default" type="Color" />
191191
<description>
192192
Creates a [Color] from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns [param default] if the color cannot be inferred from the string.
193+
If you want to create a color from String in a constant expression, use the equivalent constructor instead (i.e. [code]Color("color string")[/code]).
193194
</description>
194195
</method>
195196
<method name="get_luminance" qualifiers="const">
@@ -217,6 +218,7 @@
217218
var my_color = new Color(0xbbefd2a4);
218219
[/csharp]
219220
[/codeblocks]
221+
If you want to use hex notation in a constant expression, use the equivalent constructor instead (i.e. [code]Color(0xRRGGBBAA)[/code]).
220222
</description>
221223
</method>
222224
<method name="hex64" qualifiers="static">

0 commit comments

Comments
 (0)