A basic example
In the instance
So in fact, you would pipe this calculation into the material attributes node.