Color4
-
class
cee.Color4() An immutable four component (RGBA) color.
The color components (r,g,b,a) are in the range 0..1
Note that this class is immutable.
Constructors
Constructors
-
Color4.constructor(r, g, b, a) Arguments: - r (
number) – None - g (
number) – None - b (
number) – None - a (
number) – None
Creates a color object
Return type: Color4 - r (
Properties
-
Color4.a Type: number The alpha component of the color. Range: 0..1, where 1 is fully opaque and 0 is fully transparent (invisible)
-
Color4.b Type: number The blue component of the color. Range: 0..1
-
Color4.g Type: number The green component of the color. Range: 0..1
-
Color4.r Type: number The red component of the color. Range: 0..1
Methods
equals
-
Color4.equals(other) Arguments: - other (
Color4Like) – None
Returns true if the colors are equal
Return type: boolean - other (
static from
-
Color4.from(color) Arguments: - color (
Color4Like) – None
Creates a Color4 instance from any object with r,g,b,a properties
Return type: Color4 - color (