Created
November 19, 2020 07:50
-
-
Save Prottoy2938/59bb3f5b6c9ed6fb98f27fba92e1934a to your computer and use it in GitHub Desktop.
Change SVG Color application code demo medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Suppose you have an svg element defined in html like this: | |
<img src="/profile.svg" alt="some svg" id="my-svg"/> | |
//to change its color, you can do this in the css: | |
#my-svg { | |
filter: invert(19%) sepia(48%) saturate(1556%) hue-rotate(223deg) brightness(91%) contrast(123%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment