SVG Image color does not change



I have two SVG images that I imported into a theme extension. Each one is displayed in a picture box. I try to change the color of both images in the code with:

pictureBox1.ImageSource = @”order_release?color=red”;
pictureBox2.ImageSource = @”administration?color=red”;

Only the image in picture box 1 changes to red, the one in picture box 2 stays the original color. It seems it has something to do with the image itself. Most images I use do work correctly but a few show this behavior.

A sample project is attached.

Thanks for your help and best regards


  • You must to post comments
Best Answer

Hi Rudy,

On the administrator image there was an extra  <style type=”text/css”> .st0{fill:#505050;}</style> declaration.

Once removed, you can fill it with whichever colour you want.

The project with the fixed mixin and all step-by-step files is attached.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.