fredolss/rater-js

Add possibility to change icons color

Closed this issue · 4 comments

I know that surely you have more important stuff to do, but possibility to change icon's color would be a really nice function.

The svg is a background image. Changing the colors is not possible I think without changing the image.

You can take the default image and change the color manually and then use the new image as backround image instead. Will this work for you?

Sure, but I need a possibility to specify own image in config then. Another, much better solution is filling your SVG with CSS like here: https://css-tricks.com/almanac/properties/f/fill/

That only works if its an svg element. It's a background. You can override with css. See the readme.

oTiMo commented

@fredolss : it could be usefull to use css property mask-image (https://codepen.io/noahblon/post/coloring-svgs-in-css-background-images)

could you re open this issue ?