posted 19 years ago
Question: I am trying to declare and assign values to a color array using sRGB values in one line.
I have found that
Color[] c1 = {Color.RED,Color.WHITE,Color.BLUE};
works.
But how do I get
Color[] c2 = {(255,0,0),(255,255,255),(0,0,255)};
to work?
Currently I have
Color[] c3 = new Color[3];
...
c3[0] = new Color(255,0,0);
c3[1] = new Color(255,255,255);
c3[2] = new Color(0,0,255);
but, would like this in one line. Thanks.