toHex

converts a decimal number to the hexadecimal format

string toHex(number number, [number length] );
numbernumberthe decimal number
lengthnumberthe length of the hexadecimal number
stringthe hexadecimal number

Example

webix.color.toHex(123456);// -> "1E240"
 
webix.color.toHex(123456, 10);// -> "000001E240"

Details

Note that the length parameter is used to add leading zeros to the number.

See also
Back to top