<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" version="1.1">
   <defs>
     <filter id="colormatrix" color-interpolation-filters="sRGB">
       <feColorMatrix type="matrix" values="0 1 0 0 0  1 0 0 0 0  0 0 1 0 0  0 0 0 1 0"/>
     </filter>
   </defs>
 </svg>
 <div style="width: 100px; height: 100px; background-color: rgb(255, 0, 0); transform: translateZ(0);" id="div1"></div>
 <script>
 var div = document.getElementById("div1");
 div.style.webkitFilter = "url(#colormatrix)";
 </script>
 