Constructors
constructor
- new Color(r?: number, g?: number, b?: number, a?: number): Color
-
Parameters
-
Optional r: number
-
Optional g: number
-
Optional b: number
-
Optional a: number
Properties
Static BlendType
Accessors
a
- get a(): number
- set a(val: number): void
-
Returns number
-
Parameters
Returns void
b
- get b(): number
- set b(val: number): void
-
Returns number
-
Parameters
Returns void
g
- get g(): number
- set g(val: number): void
-
Returns number
-
Parameters
Returns void
r
- get r(): number
- set r(val: number): void
-
Returns number
-
Parameters
Returns void
Static BLACK
-
Static TRANSPARENT
-
Static WHITE
-
Methods
clone
-
equals
- equals(target: Color): boolean
-
Parameters
Returns boolean
mix
-
Parameters
set
-
Parameters
Returns void
setRGBA
- setRGBA(r: number, g: number, b: number, a: number): void
-
Parameters
-
r: number
-
g: number
-
b: number
-
a: number
Returns void
setValue32
- setValue32(v32: number): void
-
Parameters
Returns void
toNormalizedArray
- toNormalizedArray(): [number, number, number, number]
-
Returns [number, number, number, number]
toRGBAString
-
Returns string
Static blendColorHex
- blendColorHex(colorHexA: number, colorHexB: number, type?: BlendType): number
-
Parameters
-
colorHexA: number
-
colorHexB: number
-
Returns number
Static fromFloatArray
- fromFloatArray(arr: number[]): Color
-
Parameters
Static fromHex
- fromHex(hex: number): Color
-
Parameters
Static getValue32FromRGBA
- getValue32FromRGBA(r: number, g: number, b: number, a: number): number
-
Parameters
-
r: number
-
g: number
-
b: number
-
a: number
Returns number
Static multiplyColorHex
- multiplyColorHex(colorHexA: number, colorHexB: number, type?: BlendType): number
-
Parameters
-
colorHexA: number
-
colorHexB: number
-
Returns number
Static randomMix
- randomMix(colorHexA: number, colorHexB: number, randomSeed?: number): number
-
Parameters
-
colorHexA: number
-
colorHexB: number
-
randomSeed: number = ...
Returns number