toRgb

converts a hexadecimal color code or RGB code string to the RGB array

array toRgb(string rgb);

Parameters

rgbstringa hexadecimal color code or RGB code string

Returns

arraythe array with RED GREEN BLUE values

Example

webix.color.toRgb("rgb(255,0,255)");// -> [255, 0, 255]
 
webix.color.toRgb("FF00FF");// -> [255, 0, 255]

See also
Back to top