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.

Index

Constructors

Properties

Methods

Constructors

cee.Color4.constructor()
Color4(r: number, g: number, b: number, a: number): Color4

Creates a color object

Parameters

r: number

g: number

b: number

a: number

Returns: Color4

Properties

cee.Color4.a

readonly

a: number

The alpha component of the color. Range: 0..1, where 1 is fully opaque and 0 is fully transparent (invisible)

cee.Color4.b

readonly

b: number

The blue component of the color. Range: 0..1

cee.Color4.g

readonly

g: number

The green component of the color. Range: 0..1

cee.Color4.r

readonly

r: number

The red component of the color. Range: 0..1

Methods

cee.Color4.equals()
equals(other: Color4Like): boolean

Returns true if the colors are equal

Parameters

other: Color4Like

Returns: boolean

static cee.Color4.from()

static

from(color: Color4Like): Color4

Creates a Color4 instance from any object with r,g,b,a properties

Parameters

color: Color4Like

Returns: Color4