Looping through RGB
hello
i am having some confusion over incrimenting the values of the RGB Colour obj in a loop, so far i hav been able to loop through 1 line of black to red. on the next line i want to change coulor creating a pallet.
I am printing 255 pixels per line whith an incrimentation in the coulour
This is what i got so far
public static void main(String[] args)
{
//********** input ****************************
int x = 10, y = 10;
int R = 0, G = 0, B = 0;
//*********************************************
//********** output ***************************
GrafixDrawingFrame f = Grafix.out;
for(int i=0; i<255; i++){
x = 10;
for(int I=0; I<255; I++){
f.setColor(new Color(R, G, B));
f.fillRect(x, y, 1, 1);
x = x + 1;
R = R + 1;
G = G + 0;
B = B + 0;
}
y = y + 1;
}
//*********************************************
}

