Interface RGBColor

Hierarchy

Index

Properties

Methods

Properties

public b: number

the blue color channel.

public g: number

the green color channel.

public r: number

the red color channel.

Methods

public brighter(k: number): Color

increase lightness by some exponential factor (gamma)

Parameters

  • k: number

Returns

Color

public darker(k?: number): Color

decrease lightness by some exponential factor (gamma)

Parameters

  • k?: number optional

Returns

Color

public hsl(): HSLColor

convert from RGB to HSL.

Returns

HSLColor

public toString(): string

convert the color to a string.

Returns

string