Follow

Problem with import of colors in SVG import

When an SVG image is added to the custom shape library, sometimes, the color of the SVG image is not imported as expected. That is color of the original SVG image is not retained in gliffy. This is because currently, Gliffy does not support importing SVG image file with inline style sheets into the custom shape library. The following types of inline style sheet formats are not supported:

Type 1: Inline Stylesheets without class attribute

Screen_Shot_2018-04-09_at_11.45.24_PM.png

Type 2: Inline Stylesheets with the class attribute

Screen_Shot_2018-04-09_at_11.47.51_PM.png

The workaround for this issue is to edit the SVG file and convert the inline style sheet to the style attribute in the file. Then try to import the file into the custom library. The examples are as follows:

Workaround for Type 1:

<svg xmlns="http://www.w3.org/2000/svg"

       xmlns:xlink="http://www.w3.org/1999/xlink">
       <circle cx="40" cy="40" r="24" style="stroke:#006600; fill:#00cc00;"/>

</svg>

Workaround for Type 2:

<svg xmlns="http://www.w3.org/2000/svg"

       xmlns:xlink="http://www.w3.org/1999/xlink">

       <circle cx="40" cy="40" r="24" style="stroke:#006600; fill:#00cc00;"/>

       <circle cx="40" cy="100" r="24" style="stroke:#660000; fill:#cc0000;"/>

</svg>

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.