In respect to your comment, your problem is that you have not correctly initialized your variable, in fact you forgot to name it.
Use
private Color[] colors = {Color.black, Color.darkGray, Color.gray, Color.lightGray, Color.pink, Color.orange, Color.cyan, Color.yellow, Color.magenta};
instead of your's and you can use your array.