summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechnicalSoup <ben.werbowyj@gmail.com>2022-02-09 15:50:50 +1100
committerTechnicalSoup <ben.werbowyj@gmail.com>2022-02-09 20:26:51 +1100
commitd5ea8547d6528d838c0c44617f6dab0c4587709e (patch)
tree9775d26f097adee7609672a8e3c66ba1e13cfa65
parentacd562be5d3295d9f5e6741e36149ca0849c9b3d (diff)
Correct C# code example in Color class reference
Correct C# example code for html method in the Color class reference.
-rw-r--r--doc/classes/Color.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml
index 4e73d4d9d8..8fd01509ec 100644
--- a/doc/classes/Color.xml
+++ b/doc/classes/Color.xml
@@ -221,14 +221,15 @@
Returns a new color from [code]rgba[/code], an HTML hexadecimal color string. [code]rgba[/code] is not case sensitive, and may be prefixed with a '#' character.
[code]rgba[/code] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [code]rgba[/code] does not contain an alpha channel value, an alpha channel value of 1.0 is applied.
If [code]rgba[/code] is invalid a Color(0.0, 0.0, 0.0, 1.0) is returned.
+ [b]Note:[/b] This method is not implemented in C#, but the same functionality is provided in the class constructor.
[codeblocks]
[gdscript]
var green = Color.html("#00FF00FF") # set green to Color(0.0, 1.0, 0.0, 1.0)
var blue = Color.html("#0000FF") # set blue to Color(0.0, 0.0, 1.0, 1.0)
[/gdscript]
[csharp]
- var green = Color.Html("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0)
- var blue = Color.Html("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0)
+ var green = new Color("#00FF00FF"); // set green to Color(0.0, 1.0, 0.0, 1.0)
+ var blue = new Color("#0000FF"); // set blue to Color(0.0, 0.0, 1.0, 1.0)
[/csharp]
[/codeblocks]
</description>