One of the powerful benefits to using Sass is that it allows you to create functions similar to a traditional programming and then call the functions from anywhere in the Sass style files.
For example, let's imagine that you want to call a specific color from multiple places, but you need to change the opacity of the color for different page elements. You can create a function like this:
And then you can call the function inside an element while passing in the opacity value needed, like this:
This will result in the following color rendering on the screen:
Now let's compare what happens when we change the argument value from 1 to 0.5 from within the wrapper (yes, it's ugly, the point is to be able to see the color difference!). So the function call would now look like this:
And that will output the following styles on the page:
And that's a basic example of using functions in Sass.