You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A try catch in the js file solved it for me (i pushed the hex code into my array aaaand problem solved)
try{rgbColors=colorThief.getColor(element);console.log(rgbColors);console.log(rgbColors[0]);console.log(rgbColors[1]);console.log(rgbColors[2]);letresult=rgbToHex(rgbColors[0],rgbColors[1],rgbColors[2]);console.log("Le résultat en hexa est : "+result);// #0033ffcolorsArray.push(result);console.log(colorsArray);}catch(error){console.log(error);colorsArray.push("#ffffff");}
Using ColorThief to return the dominant color of a white image raises an exception
Code:
Exception happens at line four:
Image used:
Other colors do not seam to cause the same error
The text was updated successfully, but these errors were encountered: