rgbToHex

converts an RGB color code to the HEX format

string rgbToHex(string|array rgb);

Parameters

rgbstring|arraya string with Red, Green and Blue color values

Returns

stringthe Hex color code

Example

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

Back to top