Skip to content

Instantly share code, notes, and snippets.

@Prottoy2938
Created November 19, 2020 07:50
Show Gist options
  • Save Prottoy2938/59bb3f5b6c9ed6fb98f27fba92e1934a to your computer and use it in GitHub Desktop.
Save Prottoy2938/59bb3f5b6c9ed6fb98f27fba92e1934a to your computer and use it in GitHub Desktop.
Change SVG Color application code demo medium
//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