Design comparison
SolutionDesign
Solution retrospective
how to change the color of the svg to white
Community feedback
- @adityaphasuPosted over 1 year ago
Hi
To answer your question, since you are using the SVG as an image then the
fill
property won't work as the SVG will be treated as an image. One way you can change the color of the logo to white is by using thefilter
property. Since you are using tailwind you can use thebrightness-[value]
to turn the logo white. You can use it like this:<img class="brightness-[100]" />
- I have used 100 (custom value) and not the available tailwind values because the
brightness
property lightens the image and we want it to be completely white. - One other way you can do is (non-css way) to make a copy of the svg file then in the svg file find the orange color and change it to white and use it instead of the original.
Good luck and happy coding!😊
Marked as helpful0 - I have used 100 (custom value) and not the available tailwind values because the
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord