Hello everyone.
I do not understand why get does not return R, G, B values instead of 1 single signed number. I am trying to get the background color and then create a rect() with the same color (fill(R,G,B)) as the background. My code is:
int backgroundColor;
void setup()
{
orientation(LANDSCAPE);
size(displayWidth, displayHeight);
background(random(0,255),random(0,255),random(0,255));
backgroundColor=get((int)displayWidth/2, (int)displayHeight/2);
}
void draw()
{
println(backgroundColor);
fill(backgroundColor);
rect(displayWidth/2,)displayHeight/2, displayWidth*0.6, )displayHeight*0.6)
}
Could you please help to get the RGB values correctly??