Help with using a js library
hey! i need help using color.js (https://github.com/luukdv/color.js/) but i dont really know how to use libraries.
GitHub
GitHub - luukdv/color.js: Extract colors from an image (0.75 KB) 🎨
Extract colors from an image (0.75 KB) 🎨. Contribute to luukdv/color.js development by creating an account on GitHub.
6 Replies
https://codepen.io/CosyXD/pen/QWXwGqM?editors=1111 erm... why is this working on codepen but not on my system
this is on my pc ^ my functions are undefined i dont understand
show index.html:13
i don't think you need to load your index.js file with type module.
(codepen will work because the js differently loaded)
also, it is easier to load libraries in the head section
i would do this
if this doesn't solve it, please show your real js file (because the error is showing on a different line than in the codepen file), and maybe something else is causing the issue
yeah that did it!
ty
maybe it had something to do with the defer attribute you added
i'll look into that
thanks yall for helping out