toRgb

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

array toRgb(string rgb);
rgbstringa hexadecimal color code or RGB code string
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