Problems with darkmode and custom JS

Hi all,

Have a p5.js animation embedded on my intro page and trying to have it change color with the dark mode switch. The animation color works when I change the body text color (as expected, see screenshots) however, when I change the body text color via the dark mode webflow interaction the custom JS doesn’t seem to recognize the change so it stays the same. Not sure if there is something within the JS that doesn’t run after the initial page load hence ignoring the change of the body color once the interaction triggers the change.

to see the animation see the live link

Any help would be greatly appreciated, see the share link below



Here is my site Read-Only:

https://preview.webflow.com/preview/jaramillo-arango?utm_medium=preview_link&utm_source=dashboard&utm_content=jaramillo-arango&preview=3c379c22c75a1399b4b82b1d5fd5bc97&workflow=preview