instance. Color

Members and methods attached to the rac.Color function.

The function contains ready-made convenience Color objects for usual values, all setup with the owning Rac instance.

Example
let rac = new Rac()
rac.Color.red // ready-made red color
rac.Color.red.rac === rac // true

Members

black

A black Color.

red

A red Color.

Methods

fromRgba(r, g, b, aopt) → {Rac.Color}

Returns a new Color with each channel received in the [0,255] range.

Parameters:
Name Type Attributes Default Description
r Number

The red channel value, in the [0,255] range

g Number

The green channel value, in the [0,255] range

b Number

The blue channel value, in the [0,255] range

a Number <optional>
255

The alpha channel value, in the [0,255] range