PIXI.utils.rgb2hex

rgb2hex(rgb: Array<number>) → {number}

Converts a color as an [R, G, B] array of normalized floats to a hexadecimal number.


 PIXI.utils.rgb2hex([1, 1, 1]); // returns 0xffffff
Parameters:
Name Type Description
rgb Array<number>

Array of numbers where all values are normalized floats from 0.0 to 1.0.

Returns:
Type Description
number

Number in hexadecimal.

Powered by webdoc!