Skip to main content

Class: Color

Extends

  • BaseType<{ a: number; b: number; g: number; r: number; }>

Constructors

new Color()

new Color(raw: {
a: number;
b: number;
g: number;
r: number;
}): Color

Parameters

ParameterType

raw

object

raw.a?

number

raw.b

number

raw.g

number

raw.r

number

Returns

Color

Inherited from

BaseType<{ r: number; g: number; b: number; a?: number; }>.constructor

Properties

raw

readonly raw: {
a: number;
b: number;
g: number;
r: number;
};

a?

optional a: number;

b

b: number;

g

g: number;

r

r: number;

Inherited from

BaseType.raw

Accessors

a

get a(): undefined | number

Returns

undefined | number


b

get b(): number

Returns

number


g

get g(): number

Returns

number


hex

get hex(): string

Returns

string


r

get r(): number

Returns

number


rgba

get rgba(): string

Returns

string

Methods

toJSON()

toJSON(): {
a: number;
b: number;
g: number;
r: number;
}

Returns

{
a: number;
b: number;
g: number;
r: number;
}
NameType
anumber
bnumber
gnumber
rnumber

Inherited from

BaseType.toJSON