Toggling a set of lights?

I am new to smart things, and I am trying to figure out if there is a way to set a routine to toggle a set of hue lights? I can easy set them to turn on or off, but would like to just be able to toggle them.

So if they are on, they would turn off and vis versa…