Is there an easy way to toggle inverted colors on/off using a hardware button

Most of the time I have my phone with a black background and white text. However, some apps have only a white theme. In these cases, I'd like a hardware button to be able to toggle on and off the inverting feature in settings > accessibility > Invert colors using a hardware button

Audience: