Class Color

Class representing a color

Remarks

It holds 3 number values ( preferrably in the range "0-1", but you can use any predetermined scale you want), corresponding to red, blue and green

Example

const redColor = new Color(1, 0, 0)
redColor.toArray() // -> [1,0,0]

Hierarchy

  • Color

Implements

Constructors

Properties

Methods

Constructors

Properties

blue: number
green: number
red: number

Methods

  • Converts the Color object instance to an array

    Returns

    an array of numbers representing the current state of the color instance

    Returns number[]

Generated using TypeDoc