Filter Effects: Filter Effects is a way to process the rendering of an element before it is displayed in the document. Typically, rendering an element via CSS or SVG can be described as if the element, including its children, were drawn into a buffer (like a raster image) and then that buffer was composed in the parent of the elements. The filters apply an effect before the composition stage. Examples of such effects are blurring, color intensity change and image distortion.
Follow an example of code using Filter Effects: https://www.w3schools.com/graphics/tryit.asp?filename=trysvg_fegaussianblur
filter() Function: CSS filters are a powerful tool that developers can use to get varied visual effects (such as Photoshop filters for the browser). The CSS filter property provides access to effects such as blur or color change in the rendering of an element before the element is displayed. Filters are commonly used to adjust the rendering of an image, a background or an edge.
Possible filters:
- Blur()
- Brightness()
- Contrast()
- drop-shadow(
- Grayscale()
- Hue-Rotate()
- invert()
- opacity()
- saturate()
- sepia()
- url() - for Applying SVG
Follow an example of code using the filter property: https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_filter_grayscale
Notes: According to the website Can I Use (https://caniuse.com/#search=filter), filter does not have support for all browsers, and for this reason, it is interesting to use Autoprefixer CSS online (https://autoprefixer.github.io/) to add prefix vendors (-Webkit-filter) and have the necessary support to run in the browsers.
Search links:
https://www.w3.org/TR/filter-effects-1/
https://www.w3.org/TR/filter-effects/#FilterCSSImageValue
https://css-tricks.com/almanac/properties/f/filter/
I believe that the
filter
Function is for manipulations with SVG, correct me if I’m wrong.– Kamile Pimenta