Color.componentToHex()

<static> componentToHex(color) → {string}

Return a string containing a hex representation of the given color component.

Parameters
Name Type Description
color number

The color channel to get the hex value for, must be a value between 0 and 255.

Returns
string -

A string of length 2 characters, i.e. 255 = ff, 100 = 64.

Source code: utils/Color.js (Line 694)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.