An RGBA color value.
More...
|
None | __init__ (self, Union[int, float] r=0, Union[int, float] g=0, Union[int, float] b=0, Union[int, float] a=0) |
|
| r (self) |
|
| setR (self, value) |
|
| g (self) |
|
| setG (self, value) |
|
| b (self) |
|
| setB (self, value) |
|
| a (self) |
|
| setA (self, value) |
|
| setValues (self, r, g, b, a) |
|
| __eq__ (self, other) |
|
| __hash__ (self) |
|
| __repr__ (self) |
|
| toHexString (self, include_alpha=False) |
| Returns a 7-character string in "#RRGGBB" format representing the color.
|
|
|
| fromARGB (value) |
| Returns a new Color constructed from a 32-bit integer in ARGB order.
|
|
| fromHexString (value) |
| Returns a new Color constructed from a 7- or 9-character string "#RRGGBB" or "#AARRGGBB" format.
|
|
An RGBA color value.
This class represents an RGBA color value, in the range of 0.0 to 1.0.
◆ fromARGB()
UM.Math.Color.Color.fromARGB |
( |
|
value | ) |
|
|
static |
Returns a new Color constructed from a 32-bit integer in ARGB order.
- Parameters
-
value | A 32-bit integer representing a color in ARGB order. |
- Returns
- A Color constructed from the components of value.
◆ fromHexString()
UM.Math.Color.Color.fromHexString |
( |
|
value | ) |
|
|
static |
Returns a new Color constructed from a 7- or 9-character string "#RRGGBB" or "#AARRGGBB" format.
- Parameters
-
value | A 7- or 9-character string representing a color in "#RRGGBB" or "#AARRGGBB" format. |
- Returns
- A Color constructed from the components of value.
◆ toHexString()
UM.Math.Color.Color.toHexString |
( |
|
self, |
|
|
|
include_alpha = False |
|
) |
| |
Returns a 7-character string in "#RRGGBB" format representing the color.
- Parameters
-
include_alpha | Whether to return a 7-character "#RRGGBB" or a 9 character "#AARRGGBB" format. |
- Returns
- A 7- or 9-character string representing a color in "#AARRGGBB" format.
The documentation for this class was generated from the following file: