diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-21 17:16:10 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-21 17:16:10 +0200 |
commit | 227f12478d2d29fc3884388d973a4de654d6651f (patch) | |
tree | 92916a9a5ae37fa8abe69df4b66e9c7ddf4be26a /doc/classes/Color.xml | |
parent | 277d2f1f50fe060ad7ff4b2696bf67a742a0ea83 (diff) | |
download | redot-engine-227f12478d2d29fc3884388d973a4de654d6651f.tar.gz |
Document how Vector2, Vector3 and Color behave in a boolean context
See #39731.
Diffstat (limited to 'doc/classes/Color.xml')
-rw-r--r-- | doc/classes/Color.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index b35d4fb36a..17b474531e 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -5,8 +5,9 @@ </brief_description> <description> A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1. - You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. + You can also create a color from standardized color names by using [method @GDScript.ColorN] or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. + [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. </description> <tutorials> </tutorials> |