Constructors
constructor
- new Color(r?, g?, b?, a?): Color
-
Parameters
-
r: number = 0
-
g: number = 0
-
b: number = 0
-
a: number = 1
Methods
equals
- equals(color): boolean
-
Returns boolean
set
- set(r, g, b, a?): Color
-
Parameters
-
r: number
-
g: number
-
b: number
-
Optional
a: number
setFromHSL
- setFromHSL(h, s, l): Color
-
Parameters
-
h: number
-
s: number
-
l: number
toHSL
- toHSL(): {
h: number;
l: number;
s: number;
}
-
Returns {
h: number;
l: number;
s: number;
}
-
h: number
-
l: number
-
s: number
toStyleText
- toStyleText(): string
-
Returns string