gray out buttons

I’m making a small game, the player has a UI and when a button/skill is on cooldown i’d like to to be “greyed out” I figured i’d do this by filtering the texture. I looked in the API and found this:

class bge.texture.FilterGray

But the documentation on how to use it is very poor and I’d love some help on it.

I want to use it like


if skill['cooldown'] == True:
   bge.texture.FilterGray #graying out the button