Returns the luminance of the color in the [code][0.0, 1.0][/code] range.
This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.
[b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method to_linear] to convert it to the linear color space first.
[b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first.
</description>
</method>
<methodname="get_named_color"qualifiers="static">
@ -321,6 +321,18 @@
[/codeblocks]
</description>
</method>
<methodname="linear_to_srgb"qualifiers="const">
<returntype="Color"/>
<description>
Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation.
</description>
</method>
<methodname="srgb_to_linear"qualifiers="const">
<returntype="Color"/>
<description>
Returns the color converted to the linear color space. This assumes the original color is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation.
</description>
</method>
<methodname="to_abgr32"qualifiers="const">
<returntype="int"/>
<description>
@ -405,12 +417,6 @@
[/codeblocks]
</description>
</method>
<methodname="to_linear"qualifiers="const">
<returntype="Color"/>
<description>
Returns the color converted to the linear color space. This assumes the original color is in the sRGB color space. See also [method to_srgb] which performs the opposite operation.
</description>
</method>
<methodname="to_rgba32"qualifiers="const">
<returntype="int"/>
<description>
@ -443,12 +449,6 @@
[/codeblocks]
</description>
</method>
<methodname="to_srgb"qualifiers="const">
<returntype="Color"/>
<description>
Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This assumes the original color is in the linear color space. See also [method to_linear] which performs the opposite operation.