You can run a ‘Do Every x Seconds’ workflow to set the state value, then set the text colour to that state value.
Here’s a simple way to do it (no doubt there are other ways as well)…
First, create an option set containing your colours, including an attribute (text) for the hex code, and a Number for the colour order (call it something like ‘Text Colour Option’):
(Red, #F01D1D, 1); (Blue, #1D36F0, 2), and so on…
Create a custom state somewhere on your page (called something like ‘Text Colour’) of the type ‘Text Colour Option’ (the option set you’ve just created for your colours). Set the default value to be the first colour in the option set.
Set the colour of your text to a dynamic value, that being the custom state (Text Colour)'s hex code.
Then run a ‘Do Every x Seconds’ workflow to set the ‘Text Colour’ custom state value to:
get all Text Colour Options: filtered: This Text Colour Option's Number-1 is Custom State Text Colour's Number: first item
(In other words, you’re setting the custom state value to be the next colour in your list of colours.)
That’s all there is to it
P.S. if you’re wondering how or why it will cycle back to the first colour in the option set once it reaches the end, it’s simply because it will be unable to find a colour that matches the filter constraint on the final colour, and so instead will revert to the default value which you set for the custom state, i.e. the first colour in the option set. Then it will cycle through again).