I want the stroke of my shape to cycle between black(0) and white(255) continuously. I am stuck with the logic for this.
So far I have used a boolean variable of 'ascending' for when the stroke var colour is ascending, and using an if statement to cycle the colour up by increments of one if ascending is true. I have also managed to make ascending to become false when the stroke colour reaches 255 (white).
I now want to make the colour decrease when it hits 255 but can't seem to get this to work. Please help!