The function RGBtoHex has to be updated.
The following lines have to be exchanged:
line 108 ff:
if (rgb.r.length == 1) { rgb.r = '0' + rgb.r; }
if (rgb.g.length == 1) { rgb.g = '0' + rgb.g; }
if (rgb.b.length == 1) { rgb.b = '0' + rgb.b; }
to replaced with:
if (hex[0].length == 1) { hex[0] = "0" + hex[0];}
if (hex[1].length == 1) { hex[1] = "0" + hex[1];}
if (hex[2].length == 1) { hex[2] = "0" + hex[2];}
The function RGBtoHex has to be updated. The following lines have to be exchanged: line 108 ff: if (rgb.r.length == 1) { rgb.r = '0' + rgb.r; } if (rgb.g.length == 1) { rgb.g = '0' + rgb.g; } if (rgb.b.length == 1) { rgb.b = '0' + rgb.b; }
to replaced with:
if (hex[0].length == 1) { hex[0] = "0" + hex[0];} if (hex[1].length == 1) { hex[1] = "0" + hex[1];} if (hex[2].length == 1) { hex[2] = "0" + hex[2];}
Sorry.