Hello,
If you are trying to apply this in Menus Widgets or Text Frame then the answer is no.
But if you care open to use Rectangle then I have a workaround for you. You can Create two Photoshop images with transparent background and can fill it in the active and normal state of the rectangle.
Regards
Vivek