Wednesday, 2 October 2013

Creating a color array with distinct colors

Creating a color array with distinct colors

I'm trying to create an array which includes separate distinct colors.
Color array will created automatically when the range 'n' given. It's
something as following:
variable n = 2;
colourarrray = [red,green];
variable n = 4;
colourarrray = [red,green,blue,yellow];
What is the easiest method to generate such a color array?

No comments:

Post a Comment