Have a look at my Emotional Stroop for Mobile online demo
I can’t remember if I use it there but the way I randomise with no repeats is to use the modulus function.
For example, if you have four colours.
thisColour = (thisColour + 1 + randint(3)) % 4
This will add a minimum of 1 and maximum of 3 to the current colour index.