Color alpha value question

edited April 2014 in How To...

Hi, I am just wondering how I would co about adding an alpha transparency value to a colour when the colour is a random colour selected from an array:

The array is called 'colors' and it contains 5 colours.

stroke(colors [(int)random(0, 5)]);

Tagged:

Answers

  • Answer ✓

    stroke(colors [(int)random(0, 5)], 27);

  • color c = colors[(int)random(0, 5)];
    stroke(c.getRed(), c.getGreen(), c.getBlue(), 127);
    
Sign In or Register to comment.