Custom code to replace colour in SVGs

Hi guys, I want to implement something similar to what Pablo has done here: https://generator.opendoodles.com/.

I did find his webflow project here: https://webflow.com/website/open-doodles, but that doesn’t have the logic that changes the colour based on the colour picker. I did some digging and saw that his live website uses React. So seems like he exported the website and wrote some custom code for that.

Would any of you know how to implement this in Webflow? That is to manipulate the SVGs that are added through CMS collections using the colour picker?

Any help that you guys can offer would be great!

Best,
Karthik