Real pixel, color applied through CSS Filtered pixel, color applied through CSS |
The goal was to be able to create custom style sheets and allow for the coloring of icons For this code to work well the starting color needs to be black. If your icon set isn't black you can prepend "brightness(0) saturate(100%)" to your filter property which will first turn the icon set to black. For as long as I worked on creating this solution from multiple resources I found some had spent far longer to create this already completed solution. Only slightly modified to focus on HEX colors. Credit goes to MultiplyByZer0 for their post https://stackoverflow.com/a/43960991/604861 |