Masks are great when you do want your background color to show through. For clarity in the example, we’ve added a background color on the icon so you can see the effect.
To accomplish the masking some SVG definitions are generated. You can control the ID's used by specifying data-fa-mask-id. (Available in 5.12.2 or later.)