Staircase procedure with randomised colors

Hi !

I’m in an internship where i’m asked to code an experiment with a staircase procedure, so I use the demo as a base but my stimuli must be variation of colors.

Is there a way to randomise the colors of the stimuli and vary the brigthness of each stimuli depending on the level of the staircase ?

Or should I do it manually by using an external list ?

Thank you !