Skip to main content

Color

Methods​

new​

Returns a color object from the specified RGB(A) parameters.

const col = Color.new(r, g, b, a?);

getR​

Get red intensity of the color.

const r = Color.getR(col);

getG​

Get green intensity of the color.

const g = Color.getG(col);

getB​

Get blue intensity of the color.

const b = Color.getB(col);

getA​

Get alpha intensity of the color.

const a = Color.getA(col);

setR​

Set red intensity of the color.

Color.setR(col, r);

setG​

Set green intensity of the color.

Color.setG(col, g);

setB​

Set blue intensity of the color.

Color.setB(col, b);

setA​

Set alpha intensity of the color.

Color.setA(col, a);