Alex Rivera | Logout

Changing SVG image color with JavaScript

Asked 2012-03-26T13:22:55.007
123

I am trying to alter colors in an SVG with JavaScript. Is this possible? Can I load it as an object and then somehow have access to the color and image data?

Edit
Report

1 Answer

7

Here's a full example that shows how to modify the fill color of an svg referenced via <embed>, <object> and <iframe>.

Also see How to apply a style to an embedded SVG?

answered 2012-03-28T09:21:17.790

Your Answer