{"id":268607,"date":"2018-03-30T06:41:03","date_gmt":"2018-03-30T13:41:03","guid":{"rendered":"http:\/\/css-tricks.com\/?p=268607"},"modified":"2020-04-15T13:13:09","modified_gmt":"2020-04-15T20:13:09","slug":"solved-with-css-colorizing-svg-backgrounds","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/solved-with-css-colorizing-svg-backgrounds\/","title":{"rendered":"Solved with CSS! Colorizing SVG Backgrounds"},"content":{"rendered":"\n

This post is the first in a series about the power of CSS.<\/p>\n\n\n\n

Article Series:<\/h4>\n\n\n
  1. Colorizing SVG Backgrounds (this post)<\/li>
  2. Dropdown Menus<\/a><\/li>
  3. Logical Styling Based On the Number of Given Elements<\/a><\/li><\/ol>\n<\/div><\/div>\n\n\n\n

    CSS is getting increasingly powerful, and with features like CSS grid and custom properties (also known as CSS variables), we\u2019re seeing some really creative solutions emerging. The possibilities are still being explored on what CSS can do to make writing UI\u2019s simpler, and that\u2019s exciting!<\/p>\n\n\n\n

    One of those is now one of my favorite CSS features: filters<\/a>. Let\u2019s look at how we can use filters to solve a problem you may have encountered when working with SVG as a background image on an element.<\/p>\n\n\n\n\n\n\n

    CSS Filters<\/h3>\n\n\n

    First, let\u2019s start by with an overview of filters. They include the following functions:<\/p>\n\n\n\n