rgbToHex

converts an RGB color code to the HEX format

string rgbToHex(string|array rgb);
rgbstring|arraya string with Red, Green and Blue color values
stringthe Hex color code

Example

webix.color.rgbToHex("115,116,133"); // -> "#737485"  
// or
webix.color.rgbToHex([115,116,133]);

Back to top