Duotone (gradient map) images using canvas

I was wondering if it would be possible to integrate this jQuery script into Webflow to implement browser-rendered duotone styling for images (also known as a gradient map)?