From bb1eb84da4e74357a5455cd72cb04492fbd148e7 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 24 Dec 2021 16:51:31 +0800 Subject: [PATCH] Alpha channel indicates opacity, not transparency --- doc/classes/Color.xml | 4 ++-- doc/classes/ColorPicker.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 5fceb9f7b9f..39e108a755d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -4,7 +4,7 @@ Color in RGBA format using floats on the range of 0 to 1. - A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). + A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for opacity. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). 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]. @@ -246,7 +246,7 @@ - The color's alpha (transparency) component, typically on the range of 0 to 1. + The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque. Wrapper for [member a] that uses the range 0 to 255 instead of 0 to 1. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 968b1b4abac..dc04f00221a 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -41,7 +41,7 @@ If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). - If [code]true[/code], shows an alpha channel slider (transparency). + If [code]true[/code], shows an alpha channel slider (opacity). If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.