Next.js Discord

Discord Forum

Changing the colour of an SVG

Unanswered
Beveren posted this in #help-forum
Open in Discord
BeverenOP
does anybody know a way of changing the colour of an SVG which is in a next/Image component (I want it to switch for light/dark mode). Ive been able to do it by deconstructing the svg and using !imporanat to overide the fill but was wondering if there was a better method. Thanks

1 Reply

Savannah
@Beveren If you just need to change the color, you can use the css property 'filter' and then just transform it to gray scale