You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/Color.xml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,7 @@
190
190
<paramindex="1"name="default"type="Color" />
191
191
<description>
192
192
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]).
193
194
</description>
194
195
</method>
195
196
<methodname="get_luminance"qualifiers="const">
@@ -217,6 +218,7 @@
217
218
var my_color = new Color(0xbbefd2a4);
218
219
[/csharp]
219
220
[/codeblocks]
221
+
If you want to use hex notation in a constant expression, use the equivalent constructor instead (i.e. [code]Color(0xRRGGBBAA)[/code]).
0 commit comments