This is great, thank you ever so much!
Audun Olsen
1
A way would be to duplicate the SVG markup for every image. convertToDueTone() would receive both the colours and the specific SVG you want to apply the effect to.
Another option would be to let convertToDueTone() create the SVG markup and apply the effect. That way you don’t need to duplicate the SVG code and it is more maintainable.