Constructors
constructor
Parameters
Properties
Private _a
_a: any
Private _b
_b: any
Private _g
_g: any
Private _r
_r: any
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
elements
Returns number[]
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
Methods
clone
copy
Parameters
scale
- scale(intensity: number): Color
Parameters
set
- set(r: number, g: number, b: number, a?: number): Color
Parameters
r: number
g: number
b: number
Optional a: number
setFrom255
- setFrom255(r: number, g: number, b: number, a?: number): Color
Parameters
r: number
g: number
b: number
Optional a: number
setFromHex
- setFromHex(hex?: string, alpha?: number): Color
Parameters
Optional hex: string
Optional alpha: number
setFromRGBA
- setFromRGBA(rgba?: string, alpha?: number): Color
Parameters
Optional rgba: string
Optional alpha: number
toArrays
Returns number[]
根据Hex值设置颜色