Color Methods |
The Color type exposes the following members.
Name | Description | |
---|---|---|
![]() | Blend |
Returns a new color resulting from blending this color over another.
If the color is opaque, the result is also opaque.
The second color may have a range of alpha values.
|
![]() ![]() | Color8 |
Returns a color constructed from integer red, green, blue, and alpha channels.
Each channel should have 8 bits of information ranging from 0 to 255.
|
![]() ![]() | ColorN |
Returns a color according to the standardized name, with the
specified alpha value. Supported color names are the same as
the constants defined in Colors.
|
![]() | Contrasted |
Returns the most contrasting color.
|
![]() | Darkened |
Returns a new color resulting from making this color darker
by the specified ratio (on the range of 0 to 1).
|
![]() | Equals(Object) | (Overrides ValueTypeEquals(Object).) |
![]() | Equals(Color) | |
![]() ![]() | FromHsv |
Constructs a color from an HSV profile, with values on the
range of 0 to 1. This is equivalent to using each of
the `h`/`s`/`v` properties, but much more efficient.
|
![]() | GetHashCode | (Overrides ValueTypeGetHashCode.) |
![]() | GetType | (Inherited from Object.) |
![]() | Inverted |
Returns the inverted color: `(1 - r, 1 - g, 1 - b, a)`.
|
![]() | IsEqualApprox |
Returns true if this color and `other` are approximately equal, by running
IsEqualApprox(Single, Single) on each component.
|
![]() | Lightened |
Returns a new color resulting from making this color lighter
by the specified ratio (on the range of 0 to 1).
|
![]() | LinearInterpolate(Color, Color) |
Returns the result of the linear interpolation between
this color and `to` by color amount `weight`.
|
![]() | LinearInterpolate(Color, Single) |
Returns the result of the linear interpolation between
this color and `to` by amount `weight`.
|
![]() | ToAbgr32 |
Returns the color converted to a 32-bit integer in ABGR
format (each byte represents a color channel).
ABGR is the reversed version of the default format.
|
![]() | ToAbgr64 |
Returns the color converted to a 64-bit integer in ABGR
format (each word represents a color channel).
ABGR is the reversed version of the default format.
|
![]() | ToArgb32 |
Returns the color converted to a 32-bit integer in ARGB
format (each byte represents a color channel).
ARGB is more compatible with DirectX, but not used much in Godot.
|
![]() | ToArgb64 |
Returns the color converted to a 64-bit integer in ARGB
format (each word represents a color channel).
ARGB is more compatible with DirectX, but not used much in Godot.
|
![]() | ToHsv |
Converts a color to HSV values. This is equivalent to using each of
the `h`/`s`/`v` properties, but much more efficient.
|
![]() | ToHtml |
Returns the color's HTML hexadecimal color string in RGBA format.
|
![]() | ToRgba32 |
Returns the color converted to a 32-bit integer in RGBA
format (each byte represents a color channel).
RGBA is Godot's default and recommended format.
|
![]() | ToRgba64 |
Returns the color converted to a 64-bit integer in RGBA
format (each word represents a color channel).
RGBA is Godot's default and recommended format.
|
![]() | ToString | (Overrides ValueTypeToString.) |
![]() | ToString(String) |