To avoid the XY-problem, the context up front: I'm rendering TikZ diagrams to SVG and including them in my website. The background of the images has changing colors, so I need the transparency to work in the browser for it to look right.
There is a feature in TikZ which is supported in the PDF output format called "knockout transparency", which basically treats the alpha channel the same as a color channel, and paints over it instead of blending. In this way I can draw a blue circle and make a part inside it red and semi-transparent. However, this feature is not directly supported in SVG. There are, however, possible ways to produce identical results, such as using masks or flattening the transparency groups.
So my question is: Is there a way to make this work automatically? I have researched TikZ functionalities, and avoiding the use of knockouts either doesn't produce my desired output or makes the TikZ code extremely complicated (if it is automatic though I wouldn't mind). I also do not want to rasterize my image if that is possible. Is it possible convert from TikZ / DVI (with suitable driver) / PDF to SVG or any other web-based vector graphics format, such that the transparency is correctly rendered? Or maybe to transform the TikZ code as mentioned above?