class_color - BonianSazanShomal/godot GitHub Wiki
Color
####Category: Built-In Types
Brief Description
Color in RGBA format.
Member Functions
- Color blend ( Color over )
- Color contrasted ( )
- float gray ( )
- Color inverted ( )
- Color linear_interpolate ( Color b, float t )
- int to_32 ( )
- int to_ARGB32 ( )
- String to_html ( bool with_alpha=True )
- void Color ( float r, float g, float b, float a )
- void Color ( float r, float g, float b )
- void Color ( int from )
- void Color ( String from )
Member Variables
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, ranging from 0 to 1.
Member Function Description
contrasted
- Color contrasted ( )
Return the most contrasting color with this one.
gray
- float gray ( )
Convert the color to gray.
inverted
- Color inverted ( )
Return the inverted color (1-r, 1-g, 1-b, 1-a).
linear_interpolate
Return the linear interpolation with another color.
to_32
- int to_32 ( )
Convert the color to a 32 its integer (each byte represets a RGBA).
to_ARGB32
- int to_ARGB32 ( )
Convert color to ARGB32, more compatible with DirectX.
to_html
Return the HTML hexadecimal color string.
Color
Construct the color from an RGBA profile.
Color
Construct the color from an RGBA profile.
Color
- void Color ( int from )
Construct the color from an RGBA profile.
Color
- void Color ( String from )
Construct the color from an RGBA profile.