Counterlight control through button and Core variable

Hey everyone,

I am brand new to Home Automation and just trying to get things up. I looked through some threads but didn’t find what I need. One thing I wanted to do is to control my RGBW counter light with a Smartthings button.

Here is what I’d like to do:

Every time I push the button I want to change the color of the light to a specific color. My plan was to use a variable, let’s say from 0-5 (every number is a certain color). When it’s greater than 5 it should reset back to zero and so on. To turn the light off I’d like to use the hold function of the button.

Anyone knows of a step by step instruction for this? this would be my first time using a variable.

Any help would be much appreciated.