Placing the SVG output directly inline with the page code I am able to simply modify fill colors with CSS like so:
po
Now you can achieve this on the client side like this:
var green = '3CB54A'; var red = 'ED1F24'; var svg = ' '; var encoded = window.btoa(svg); document.body.style.background = "url(data:image/svg+xml;base64,"+encoded+")";
Fiddle here!