Using function from

Hello community,

i want to use color-thief.js, which is a script that returns the dominant color of an image, in my javascript code. I imported it using the instructions found in the documentation but when i try to use it the compiler says that it is not a function. what am i doing wrong? Should i use module.exports?

var ColorThief = require('/color-thief.js');
var colorThief = new ColorThief();

Thank you in advance

Edit

Sorry for the title but i accidentaly posted it with the title incomplete and i cannot find how to fix it :slight_smile:

That library seems to be DOM dependent and will not work with Fuse.

I dont know much about framer but i 've seen it in a framer implementation

Framer runs in the browser and thus has access to the DOM afaik.

Ok then! Thank you for your help :slight_smile: