How to change the color of SVG Object in perspective

I import an SVG graphic in perspective but there is no option in props or style to dynamic the color of the shape.
Only I can change background color not the lines.

This is probably because you apply it on the SVG element (which doesn’t have a border), instead of to the individual paths.

I don’t know Perspective well enough on how you can define child selectors, but you’d need something like that:

From what I can tell from your screenshot, it looks like you are setting style properties for the Icon (svg) Component, when you really want to be setting the color for the actual svg pieces.
In Icon.props, expand the available indices of the elements property (your case only has one index). The fill and stroke “paint” properties are what you should use to determine the coloring of the svg pieces.

1 Like