Class Color

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(rgb: string, a: number): Color

Parameters

  • rgb: string
  • a: number

Returns

Color

constructor(rgb: Array<number>, a: number): Color

Parameters

  • rgb: Array<number>
  • a: number

Returns

Color

Properties

public alpha: number

public rgb: Array<number>

Methods

public compare(x: Color): number

Parameters

Returns

number

public eval(): Color

Returns

Color

public operate(op: Operation, other: Color): Color

Parameters

Returns

Color

public operate(op: Operation, other: IColorable): Color

Parameters

Returns

Color

public toARGB(): string

Returns

string

public toCSS(): string

Returns

string

public toHSL(): HSL

Returns

HSL