PIXI.utils.hex2rgb
hex2rgb(hex: number, out: Array<number>) → {Array<number>}
Converts a hexadecimal color number to an [R, G, B] array of normalized floats (numbers from 0.0 to 1.0).
PIXI.utils.hex2rgb(0xffffff); // returns [1, 1, 1]
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
hex | number |
The hexadecimal number to convert |
||
out | Array<number> |
<optional> |
[] |
If supplied, this array will be used rather than returning a new one |
Type | Description |
---|---|
Array<number> |
An array representing the [R, G, B] of the color where all values are floats. |