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
Parameter | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
Returns
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;
}
Name | Type |
---|---|
a | number |
b | number |
g | number |
r | number |
Inherited from
BaseType.toJSON