(Trying to) fill HSB (Hue|Saturation|Brightness) array
I'm getting Code:
ArrayIndexOutOfBoundsException: 0
when trying to fill the array with Hue values (Saturation and Brightness remain 100%):
Code:
private Color[] hsb = new Color[numberOfCircles]; //outside method
float h=0; //in method
float raise=(1.f/numberOfCircles);
for (int i=0; i<stKrogcev; i++) {
hsb[i]=Color.getHSBColor(h,1.0f,1.0f); //getHSBColor: "Creates a Color object based on the specified values for the HSB color model."
h+=raise;
}