toHex

converts a decimal number to the hexadecimal format

string toHex(number number, [number length] );
number
numberthe decimal number length
numberthe 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
  • API
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.