Color in RGBA format with some support for ARGB format.
</brief_description>
<description>
A color is represented as red, green and blue (r,g,b) components. Additionally, "a" represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some methods (such as set_modulate(color)) may accept values > 1.
# The following code creates the same color of an RGBA(178, 217, 10, 255)
var c1 = Color("#ffb2d90a") # ARGB format with '#'
var c2 = Color("ffb2d90a") # ARGB format
var c3 = Color("#b2d90a") # RGB format with '#'
var c4 = Color("b2d90a") # RGB format
[/codeblock]
</description>
</method>
<methodname="blend">
<returntype="Color">
</return>
<argumentindex="0"name="over"type="Color">
</argument>
<description>
Returns a new color resulting from blending this color over another color. If the color is opaque, the result would also be opaque. The other color could then take a range of values with different alpha values.
[codeblock]
var bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%
var fg = Color(1.0, 0.0, 0.0, .5) # Red with alpha of 50%
var blendedColor = bg.blend(fg) # Brown with alpha of 75%
[/codeblock]
</description>
</method>
<methodname="contrasted">
<returntype="Color">
</return>
<description>
Returns the most contrasting color.
[codeblock]
var c = Color(.3, .4, .9)
var contrastedColor = c.contrasted() # a color of an RGBA(204, 229, 102, 255)
Returns the color's 32-bit integer in ARGB format (each byte represents a component of the ARGB profile). ARGB is more compatible with DirectX.
[codeblock]
var c = Color(1, .5, .2)
print(c.to_argb32()) # Prints 4294934323
[/codeblock]
</description>
</method>
<methodname="to_abgr32">
<returntype="int">
</return>
<description>
Returns the color's 32-bit integer in ABGR format (each byte represents a component of the ABGR profile). ABGR is the reversed version of the default format.
Returns the color's 32-bit integer in RGBA format (each byte represents a component of the RGBA profile). RGBA is the format that Godot uses by default.
[codeblock]
var c = Color(1, .5, .2)
print(c.to_rgba32()) # Prints 4286526463
[/codeblock]
</description>
</method>
<methodname="to_argb64">
<returntype="int">
</return>
<description>
Returns the color's 64-bit integer in ARGB format (each word represents a component of the ARGB profile). ARGB is more compatible with DirectX.
[codeblock]
var c = Color(1, .5, .2)
print(c.to_argb64()) # Prints -2147470541
[/codeblock]
</description>
</method>
<methodname="to_abgr64">
<returntype="int">
</return>
<description>
Returns the color's 64-bit integer in ABGR format (each word represents a component of the ABGR profile). ABGR is the reversed version of the default format.
[codeblock]
var c = Color(1, .5, .2)
print(c.to_abgr64()) # Prints -225178692812801
[/codeblock]
</description>
</method>
<methodname="to_rgba64">
<returntype="int">
</return>
<description>
Returns the color's 64-bit integer in RGBA format (each word represents a component of the RGBA profile). RGBA is the format that Godot uses by default.